react-native-platform-components 0.6.0 → 0.7.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 (99) hide show
  1. package/README.md +211 -44
  2. package/android/src/main/java/com/platformcomponents/PCContextMenuView.kt +2 -2
  3. package/android/src/main/java/com/platformcomponents/PCSegmentedControlView.kt +241 -0
  4. package/android/src/main/java/com/platformcomponents/PCSegmentedControlViewManager.kt +105 -0
  5. package/android/src/main/java/com/platformcomponents/PCSelectionMenuView.kt +4 -0
  6. package/android/src/main/java/com/platformcomponents/PlatformComponentsPackage.kt +1 -0
  7. package/app.plugin.cjs +4 -0
  8. package/expo-module.config.json +4 -0
  9. package/ios/PCContextMenu.swift +65 -22
  10. package/ios/PCDatePickerView.swift +28 -11
  11. package/ios/PCSegmentedControl.h +10 -0
  12. package/ios/PCSegmentedControl.mm +194 -0
  13. package/ios/PCSegmentedControl.swift +200 -0
  14. package/lib/commonjs/ContextMenu.js +118 -0
  15. package/lib/commonjs/ContextMenu.js.map +1 -0
  16. package/lib/commonjs/ContextMenuNativeComponent.ts +141 -0
  17. package/lib/commonjs/DatePicker.js +86 -0
  18. package/lib/commonjs/DatePicker.js.map +1 -0
  19. package/lib/commonjs/DatePickerNativeComponent.ts +69 -0
  20. package/lib/commonjs/SegmentedControl.js +93 -0
  21. package/lib/commonjs/SegmentedControl.js.map +1 -0
  22. package/lib/commonjs/SegmentedControlNativeComponent.ts +79 -0
  23. package/lib/commonjs/SelectionMenu.js +73 -0
  24. package/lib/commonjs/SelectionMenu.js.map +1 -0
  25. package/lib/commonjs/SelectionMenuNativeComponent.ts +97 -0
  26. package/lib/commonjs/index.js +61 -0
  27. package/lib/commonjs/index.js.map +1 -0
  28. package/lib/commonjs/package.json +1 -0
  29. package/lib/commonjs/sharedTypes.js +6 -0
  30. package/lib/commonjs/sharedTypes.js.map +1 -0
  31. package/lib/module/SegmentedControl.js +87 -0
  32. package/lib/module/SegmentedControl.js.map +1 -0
  33. package/lib/module/SegmentedControlNativeComponent.ts +79 -0
  34. package/lib/module/index.js +1 -0
  35. package/lib/module/index.js.map +1 -1
  36. package/lib/typescript/commonjs/package.json +1 -0
  37. package/lib/typescript/commonjs/src/ContextMenu.d.ts.map +1 -0
  38. package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts.map +1 -0
  39. package/lib/typescript/commonjs/src/DatePicker.d.ts.map +1 -0
  40. package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts.map +1 -0
  41. package/lib/typescript/commonjs/src/SegmentedControl.d.ts +62 -0
  42. package/lib/typescript/commonjs/src/SegmentedControl.d.ts.map +1 -0
  43. package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts +63 -0
  44. package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts.map +1 -0
  45. package/lib/typescript/commonjs/src/SelectionMenu.d.ts.map +1 -0
  46. package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts.map +1 -0
  47. package/lib/typescript/{src → commonjs/src}/index.d.ts +1 -0
  48. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  49. package/lib/typescript/commonjs/src/sharedTypes.d.ts.map +1 -0
  50. package/lib/typescript/module/src/ContextMenu.d.ts +79 -0
  51. package/lib/typescript/module/src/ContextMenu.d.ts.map +1 -0
  52. package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts +122 -0
  53. package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts.map +1 -0
  54. package/lib/typescript/module/src/DatePicker.d.ts +40 -0
  55. package/lib/typescript/module/src/DatePicker.d.ts.map +1 -0
  56. package/lib/typescript/module/src/DatePickerNativeComponent.d.ts +54 -0
  57. package/lib/typescript/module/src/DatePickerNativeComponent.d.ts.map +1 -0
  58. package/lib/typescript/module/src/SegmentedControl.d.ts +62 -0
  59. package/lib/typescript/module/src/SegmentedControl.d.ts.map +1 -0
  60. package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts +63 -0
  61. package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts.map +1 -0
  62. package/lib/typescript/module/src/SelectionMenu.d.ts +47 -0
  63. package/lib/typescript/module/src/SelectionMenu.d.ts.map +1 -0
  64. package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts +78 -0
  65. package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts.map +1 -0
  66. package/lib/typescript/module/src/index.d.ts +6 -0
  67. package/lib/typescript/module/src/index.d.ts.map +1 -0
  68. package/lib/typescript/module/src/sharedTypes.d.ts +12 -0
  69. package/lib/typescript/module/src/sharedTypes.d.ts.map +1 -0
  70. package/package.json +32 -12
  71. package/plugin/build/index.cjs +26 -0
  72. package/plugin/build/index.d.ts +22 -0
  73. package/plugin/build/index.d.ts.map +1 -0
  74. package/plugin/tsconfig.json +16 -0
  75. package/react-native.config.js +1 -0
  76. package/shared/PCSegmentedControlComponentDescriptors-custom.h +22 -0
  77. package/shared/PCSegmentedControlShadowNode-custom.cpp +54 -0
  78. package/shared/PCSegmentedControlShadowNode-custom.h +56 -0
  79. package/shared/PCSegmentedControlState-custom.h +62 -0
  80. package/shared/react/renderer/components/PlatformComponentsViewSpec/ComponentDescriptors.h +1 -0
  81. package/src/SegmentedControl.tsx +178 -0
  82. package/src/SegmentedControlNativeComponent.ts +79 -0
  83. package/src/index.tsx +1 -0
  84. package/lib/typescript/src/ContextMenu.d.ts.map +0 -1
  85. package/lib/typescript/src/ContextMenuNativeComponent.d.ts.map +0 -1
  86. package/lib/typescript/src/DatePicker.d.ts.map +0 -1
  87. package/lib/typescript/src/DatePickerNativeComponent.d.ts.map +0 -1
  88. package/lib/typescript/src/SelectionMenu.d.ts.map +0 -1
  89. package/lib/typescript/src/SelectionMenuNativeComponent.d.ts.map +0 -1
  90. package/lib/typescript/src/index.d.ts.map +0 -1
  91. package/lib/typescript/src/sharedTypes.d.ts.map +0 -1
  92. /package/lib/typescript/{src → commonjs/src}/ContextMenu.d.ts +0 -0
  93. /package/lib/typescript/{src → commonjs/src}/ContextMenuNativeComponent.d.ts +0 -0
  94. /package/lib/typescript/{src → commonjs/src}/DatePicker.d.ts +0 -0
  95. /package/lib/typescript/{src → commonjs/src}/DatePickerNativeComponent.d.ts +0 -0
  96. /package/lib/typescript/{src → commonjs/src}/SelectionMenu.d.ts +0 -0
  97. /package/lib/typescript/{src → commonjs/src}/SelectionMenuNativeComponent.d.ts +0 -0
  98. /package/lib/typescript/{src → commonjs/src}/sharedTypes.d.ts +0 -0
  99. /package/lib/typescript/{package.json → module/package.json} +0 -0
@@ -0,0 +1,79 @@
1
+ import React from 'react';
2
+ import { type ViewProps } from 'react-native';
3
+ /**
4
+ * Attributes for a context menu action.
5
+ */
6
+ export interface ContextMenuActionAttributes {
7
+ /** Whether the action is destructive (red styling) */
8
+ destructive?: boolean;
9
+ /** Whether the action is disabled (grayed out) */
10
+ disabled?: boolean;
11
+ /** Whether the action is hidden */
12
+ hidden?: boolean;
13
+ }
14
+ /**
15
+ * A single action in the context menu.
16
+ */
17
+ export interface ContextMenuAction {
18
+ /** Unique identifier returned in callbacks */
19
+ id: string;
20
+ /** Display title */
21
+ title: string;
22
+ /** Secondary text (iOS only) */
23
+ subtitle?: string;
24
+ /** Icon name (SF Symbol on iOS, drawable resource on Android) */
25
+ image?: string;
26
+ /** Tint color for the icon (hex string or named color) */
27
+ imageColor?: string;
28
+ /** Action attributes */
29
+ attributes?: ContextMenuActionAttributes;
30
+ /** Checkmark state */
31
+ state?: 'off' | 'on' | 'mixed';
32
+ /** Nested actions for submenu */
33
+ subactions?: readonly ContextMenuAction[];
34
+ }
35
+ export interface ContextMenuProps extends ViewProps {
36
+ /** Menu title (shown as header on iOS) */
37
+ title?: string;
38
+ /** Menu actions */
39
+ actions: readonly ContextMenuAction[];
40
+ /** Disabled state */
41
+ disabled?: boolean;
42
+ /**
43
+ * How the menu is triggered:
44
+ * - 'longPress' (default): Long-press opens the menu
45
+ * - 'tap': Single tap opens the menu
46
+ */
47
+ trigger?: 'longPress' | 'tap';
48
+ /**
49
+ * Called when the user presses an action.
50
+ * Receives the action's id and title.
51
+ */
52
+ onPressAction?: (actionId: string, actionTitle: string) => void;
53
+ /** Called when the menu opens */
54
+ onMenuOpen?: () => void;
55
+ /** Called when the menu closes */
56
+ onMenuClose?: () => void;
57
+ /** The content to wrap */
58
+ children: React.ReactNode;
59
+ /** iOS-specific props */
60
+ ios?: {
61
+ /** Enable preview when long-pressing */
62
+ enablePreview?: boolean;
63
+ };
64
+ /** Android-specific props */
65
+ android?: {
66
+ /** Anchor position for the popup menu */
67
+ anchorPosition?: 'left' | 'right';
68
+ /**
69
+ * Programmatic visibility control (Android only).
70
+ * Set to true to open the menu, false to close it.
71
+ * Note: iOS does not support programmatic menu opening.
72
+ */
73
+ visible?: boolean;
74
+ };
75
+ /** Test identifier */
76
+ testID?: string;
77
+ }
78
+ export declare function ContextMenu(props: ContextMenuProps): React.ReactElement;
79
+ //# sourceMappingURL=ContextMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/ContextMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQ9C;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sDAAsD;IACtD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC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ViewProps } from 'react-native';
2
+ /**
3
+ * Attributes for a context menu action.
4
+ */
5
+ export type ContextMenuActionAttributes = Readonly<{
6
+ /** Whether the action is destructive (red styling) */
7
+ destructive?: string;
8
+ /** Whether the action is disabled (grayed out) */
9
+ disabled?: string;
10
+ /** Whether the action is hidden */
11
+ hidden?: string;
12
+ }>;
13
+ /**
14
+ * A leaf subaction (no further nesting to avoid codegen recursion issues).
15
+ */
16
+ export type ContextMenuSubaction = Readonly<{
17
+ /** Unique identifier returned in callbacks */
18
+ id: string;
19
+ /** Display title */
20
+ title: string;
21
+ /** Secondary text (iOS only) */
22
+ subtitle?: string;
23
+ /** Icon name (SF Symbol on iOS, drawable resource on Android) */
24
+ image?: string;
25
+ /** Tint color for the icon (hex string, e.g., "#FF0000") */
26
+ imageColor?: string;
27
+ /** Action attributes */
28
+ attributes?: ContextMenuActionAttributes;
29
+ /** Checkmark state: 'off' | 'on' | 'mixed' */
30
+ state?: string;
31
+ }>;
32
+ /**
33
+ * A single action in the context menu.
34
+ * Actions can be nested one level via `subactions` for submenus.
35
+ */
36
+ export type ContextMenuAction = Readonly<{
37
+ /** Unique identifier returned in callbacks */
38
+ id: string;
39
+ /** Display title */
40
+ title: string;
41
+ /** Secondary text (iOS only) */
42
+ subtitle?: string;
43
+ /** Icon name (SF Symbol on iOS, drawable resource on Android) */
44
+ image?: string;
45
+ /** Tint color for the icon (hex string, e.g., "#FF0000") */
46
+ imageColor?: string;
47
+ /** Action attributes */
48
+ attributes?: ContextMenuActionAttributes;
49
+ /** Checkmark state: 'off' | 'on' | 'mixed' */
50
+ state?: string;
51
+ /** Nested actions for submenu (one level deep) */
52
+ subactions?: ReadonlyArray<ContextMenuSubaction>;
53
+ }>;
54
+ /**
55
+ * Event emitted when an action is pressed.
56
+ */
57
+ export type ContextMenuPressActionEvent = Readonly<{
58
+ /** The action's unique identifier */
59
+ actionId: string;
60
+ /** The action's title */
61
+ actionTitle: string;
62
+ }>;
63
+ /** Interactivity state (no booleans for codegen). */
64
+ export type ContextMenuInteractivity = 'enabled' | 'disabled';
65
+ /** Trigger mode for opening the menu. */
66
+ export type ContextMenuTrigger = 'longPress' | 'tap';
67
+ /**
68
+ * iOS-specific configuration.
69
+ */
70
+ export type IOSProps = Readonly<{
71
+ /** Enable preview when long-pressing */
72
+ enablePreview?: string;
73
+ }>;
74
+ /**
75
+ * Android-specific configuration.
76
+ */
77
+ export type AndroidProps = Readonly<{
78
+ /** Anchor position for the popup menu */
79
+ anchorPosition?: string;
80
+ /**
81
+ * Programmatic visibility control (Android only).
82
+ * 'open' to show the menu, 'closed' to hide it.
83
+ */
84
+ visible?: string;
85
+ }>;
86
+ export interface ContextMenuProps extends ViewProps {
87
+ /**
88
+ * Menu title (shown as header on iOS).
89
+ */
90
+ title?: string;
91
+ /**
92
+ * Menu actions.
93
+ */
94
+ actions: ReadonlyArray<ContextMenuAction>;
95
+ /**
96
+ * Enabled / disabled state.
97
+ */
98
+ interactivity?: string;
99
+ /**
100
+ * How the menu is triggered:
101
+ * - 'longPress' (default): Long-press opens the menu
102
+ * - 'tap': Single tap opens the menu
103
+ */
104
+ trigger?: string;
105
+ /**
106
+ * Fired when user presses an action.
107
+ */
108
+ onPressAction?: CodegenTypes.BubblingEventHandler<ContextMenuPressActionEvent>;
109
+ /**
110
+ * Fired when menu opens.
111
+ */
112
+ onMenuOpen?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
113
+ /**
114
+ * Fired when menu closes.
115
+ */
116
+ onMenuClose?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
117
+ ios?: IOSProps;
118
+ android?: AndroidProps;
119
+ }
120
+ declare const _default: HostComponent<ContextMenuProps>;
121
+ export default _default;
122
+ //# sourceMappingURL=ContextMenuNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextMenuNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/ContextMenuNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE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@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import type { StyleProp, ViewStyle } from 'react-native';
3
+ import { type IOSProps as NativeIOSProps, type AndroidProps as NativeAndroidProps, type DatePickerPresentation, type DatePickerMode, type IOSRoundsToMinuteInterval, type IOSDatePickerStyle } from './DatePickerNativeComponent';
4
+ import type { AndroidMaterialMode } from './sharedTypes';
5
+ export type DatePickerProps = {
6
+ style?: StyleProp<ViewStyle>;
7
+ /** Controlled value. Use `null` for "no date selected". */
8
+ date: Date | null;
9
+ /** Optional bounds. Use `null` for "unbounded". */
10
+ minDate?: Date | null;
11
+ maxDate?: Date | null;
12
+ locale?: string;
13
+ timeZoneName?: string;
14
+ mode?: DatePickerMode;
15
+ presentation?: DatePickerPresentation;
16
+ /**
17
+ * Modal only. If presentation !== "modal", ignored.
18
+ * Wrapper ergonomics: boolean.
19
+ */
20
+ visible?: boolean;
21
+ onConfirm?: (dateTime: Date) => void;
22
+ onClosed?: () => void;
23
+ /** Test identifier */
24
+ testID?: string;
25
+ ios?: {
26
+ preferredStyle?: IOSDatePickerStyle;
27
+ countDownDurationSeconds?: NativeIOSProps['countDownDurationSeconds'];
28
+ minuteInterval?: NativeIOSProps['minuteInterval'];
29
+ roundsToMinuteInterval?: IOSRoundsToMinuteInterval;
30
+ };
31
+ android?: {
32
+ firstDayOfWeek?: NativeAndroidProps['firstDayOfWeek'];
33
+ material?: AndroidMaterialMode;
34
+ dialogTitle?: NativeAndroidProps['dialogTitle'];
35
+ positiveButtonTitle?: NativeAndroidProps['positiveButtonTitle'];
36
+ negativeButtonTitle?: NativeAndroidProps['negativeButtonTitle'];
37
+ };
38
+ };
39
+ export declare function DatePicker(props: DatePickerProps): React.ReactElement;
40
+ //# sourceMappingURL=DatePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../src/DatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,O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AC;QACtD,QAAQ,CAAC,EAAE,mBAAmB,CAAC;QAC/B,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;QAChD,mBAAmB,CAAC,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;QAChE,mBAAmB,CAAC,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;KACjE,CAAC;CACH,CAAC;AAqBF,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAqErE"}
@@ -0,0 +1,54 @@
1
+ import type { CodegenTypes, ViewProps } from 'react-native';
2
+ export type TimestampMs = CodegenTypes.Double;
3
+ export type DateChangeEvent = {
4
+ timestampMs: CodegenTypes.Double;
5
+ };
6
+ export type DatePickerMode = 'date' | 'time' | 'dateAndTime' | 'countDownTimer';
7
+ export type DatePickerPresentation = 'modal' | 'embedded';
8
+ export type IOSDatePickerStyle = 'automatic' | 'compact' | 'inline' | 'wheels';
9
+ export type IOSRoundsToMinuteInterval = 'inherit' | 'round' | 'noRound';
10
+ export type IOSProps = {
11
+ preferredStyle?: string;
12
+ countDownDurationSeconds?: CodegenTypes.Double;
13
+ minuteInterval?: CodegenTypes.Int32;
14
+ roundsToMinuteInterval?: string;
15
+ };
16
+ export type AndroidProps = {
17
+ firstDayOfWeek?: CodegenTypes.Int32;
18
+ material?: string;
19
+ dialogTitle?: string;
20
+ positiveButtonTitle?: string;
21
+ negativeButtonTitle?: string;
22
+ };
23
+ export type WebProps = Readonly<{}>;
24
+ export type WindowsProps = Readonly<{}>;
25
+ export type MacOSProps = Readonly<{}>;
26
+ /**
27
+ * Sentinel convention:
28
+ * - `Number.MIN_SAFE_INTEGER` means "no value / unbounded / unset".
29
+ * (Allows negative timestamps for pre-1970 dates.)
30
+ */
31
+ export type CommonProps = {
32
+ mode?: string;
33
+ dateMs?: CodegenTypes.WithDefault<TimestampMs, -9007199254740991>;
34
+ minDateMs?: CodegenTypes.WithDefault<TimestampMs, -9007199254740991>;
35
+ maxDateMs?: CodegenTypes.WithDefault<TimestampMs, -9007199254740991>;
36
+ locale?: string;
37
+ timeZoneName?: string;
38
+ /**
39
+ * Only used when presentation === "modal".
40
+ * Defaults should be applied in JS wrapper (recommended).
41
+ */
42
+ visible?: string;
43
+ /** Defaults should be applied in JS wrapper (recommended). */
44
+ presentation?: string;
45
+ };
46
+ export interface NativeProps extends ViewProps, CommonProps {
47
+ ios?: IOSProps;
48
+ android?: AndroidProps;
49
+ onConfirm?: CodegenTypes.BubblingEventHandler<DateChangeEvent>;
50
+ onClosed?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
51
+ }
52
+ declare const _default: import("react-native/types_generated/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
53
+ export default _default;
54
+ //# sourceMappingURL=DatePickerNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePickerNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/DatePickerNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG5D,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAChF,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,UAAU,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC/E,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAExE,MAAM,MAAM,QAAQ,GAAG;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wBAAwB,CAAC,EAAE,YAAY,CAAC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AAoB,CAAC,eAAe,CAAC,CAAC;IAC/D,QAAQ,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;CAC5D;;AAED,wBAAmE"}
@@ -0,0 +1,62 @@
1
+ import React from 'react';
2
+ import { type ViewProps } from 'react-native';
3
+ export interface SegmentedControlSegmentProps {
4
+ /** Display label for the segment */
5
+ label: string;
6
+ /** Unique value identifier for the segment */
7
+ value: string;
8
+ /** Whether this specific segment is disabled */
9
+ disabled?: boolean;
10
+ /** Optional SF Symbol name (iOS) or drawable resource name (Android) */
11
+ icon?: string;
12
+ }
13
+ export interface SegmentedControlProps extends ViewProps {
14
+ /** Array of segments to display */
15
+ segments: readonly SegmentedControlSegmentProps[];
16
+ /**
17
+ * Currently selected segment value.
18
+ * Use `null` for no selection.
19
+ */
20
+ selectedValue: string | null;
21
+ /**
22
+ * Called when the user selects a segment.
23
+ * @param value - The selected segment's value
24
+ * @param index - The selected segment's index
25
+ */
26
+ onSelect?: (value: string, index: number) => void;
27
+ /** Whether the entire control is disabled */
28
+ disabled?: boolean;
29
+ /**
30
+ * iOS-specific configuration
31
+ */
32
+ ios?: {
33
+ /**
34
+ * Momentary mode: segment springs back after touch (no persistent selection)
35
+ * Default: false
36
+ */
37
+ momentary?: boolean;
38
+ /**
39
+ * Whether segment widths are proportional to content
40
+ * Default: false (equal widths)
41
+ */
42
+ apportionsSegmentWidthsByContent?: boolean;
43
+ /**
44
+ * Selected segment tint color (hex string, e.g., "#007AFF")
45
+ */
46
+ selectedSegmentTintColor?: string;
47
+ };
48
+ /**
49
+ * Android-specific configuration
50
+ */
51
+ android?: {
52
+ /**
53
+ * Whether one segment must always be selected.
54
+ * Default: false
55
+ */
56
+ selectionRequired?: boolean;
57
+ };
58
+ /** Test identifier */
59
+ testID?: string;
60
+ }
61
+ export declare function SegmentedControl(props: SegmentedControlProps): React.ReactElement;
62
+ //# sourceMappingURL=SegmentedControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../src/SegmentedControl.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAIL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAWtB,MAAM,WAAW,4BAA4B;IAC3C,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IAEd,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IAEd,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,mCAAmC;IACnC,QAAQ,EAAE,SAAS,4BAA4B,EAAE,CAAC;IAElD;;;OAGG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAElD,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,GAAG,CAAC,EAAE;QACJ;;;WAGG;QACH,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB;;;WAGG;QACH,gCAAgC,CAAC,EAAE,OAAO,CAAC;QAE3C;;WAEG;QACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC,CAAC;IAEF;;OAEG;IACH,OAAO,CAAC,EAAE;QACR;;;WAGG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;IAEF,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAMD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,qBAAqB,GAC3B,KAAK,CAAC,YAAY,CA2EpB"}
@@ -0,0 +1,63 @@
1
+ import type { CodegenTypes, ViewProps } from 'react-native';
2
+ /**
3
+ * A single segment in the control.
4
+ */
5
+ export type SegmentedControlSegment = Readonly<{
6
+ label: string;
7
+ value: string;
8
+ disabled: string;
9
+ icon: string;
10
+ }>;
11
+ /**
12
+ * Event emitted when the user selects a segment.
13
+ */
14
+ export type SegmentedControlSelectEvent = Readonly<{
15
+ /** Selected segment index */
16
+ index: CodegenTypes.Int32;
17
+ /** Selected segment value */
18
+ value: string;
19
+ }>;
20
+ /** Interactivity state (no booleans). */
21
+ export type SegmentedControlInteractivity = 'enabled' | 'disabled';
22
+ /**
23
+ * iOS-specific configuration.
24
+ */
25
+ export type IOSProps = Readonly<{
26
+ /** Momentary mode: segment springs back after touch */
27
+ momentary?: string;
28
+ /** Whether segment widths are proportional to content */
29
+ apportionsSegmentWidthsByContent?: string;
30
+ /** Selected segment tint color (hex string) */
31
+ selectedSegmentTintColor?: string;
32
+ }>;
33
+ /**
34
+ * Android-specific configuration.
35
+ */
36
+ export type AndroidProps = Readonly<{
37
+ /** Whether one segment must always be selected */
38
+ selectionRequired?: string;
39
+ }>;
40
+ export interface SegmentedControlProps extends ViewProps {
41
+ /**
42
+ * Segments to display.
43
+ */
44
+ segments: ReadonlyArray<SegmentedControlSegment>;
45
+ /**
46
+ * Controlled selection by `value`.
47
+ * Empty string means "no selection".
48
+ */
49
+ selectedValue?: CodegenTypes.WithDefault<string, ''>;
50
+ /**
51
+ * Enabled / disabled state.
52
+ */
53
+ interactivity?: string;
54
+ /**
55
+ * Fired when the user selects a segment.
56
+ */
57
+ onSelect?: CodegenTypes.BubblingEventHandler<SegmentedControlSelectEvent>;
58
+ ios?: IOSProps;
59
+ android?: AndroidProps;
60
+ }
61
+ declare const _default: import("react-native/types_generated/Libraries/Utilities/codegenNativeComponent").NativeComponentType<SegmentedControlProps>;
62
+ export default _default;
63
+ //# sourceMappingURL=SegmentedControlNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControlNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/Segmented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C;IAE1E,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;;AAED,wBAEE"}
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ import { type ViewProps } from 'react-native';
3
+ import { type SelectionMenuOption } from './SelectionMenuNativeComponent';
4
+ import type { AndroidMaterialMode, Presentation } from './sharedTypes';
5
+ export interface SelectionMenuProps extends ViewProps {
6
+ /** Options are label + data (payload) */
7
+ options: readonly SelectionMenuOption[];
8
+ /**
9
+ * Controlled selection by the option's `data`.
10
+ * Use `null` for "no selection".
11
+ */
12
+ selected: string | null;
13
+ disabled?: boolean;
14
+ placeholder?: string;
15
+ /**
16
+ * Presentation mode:
17
+ * - 'modal' (default): Headless mode, controlled by `visible` prop.
18
+ * - 'embedded': Native renders its own inline anchor and manages open/close internally.
19
+ */
20
+ presentation?: Presentation;
21
+ /**
22
+ * Modal mode only (presentation === 'modal'):
23
+ * controls whether the native menu UI is presented.
24
+ */
25
+ visible?: boolean;
26
+ /**
27
+ * Called when the user selects an option.
28
+ * Receives the selected `data` payload, plus label/index for convenience.
29
+ */
30
+ onSelect?: (data: string, label: string, index: number) => void;
31
+ /**
32
+ * Called when the user dismisses without selecting.
33
+ */
34
+ onRequestClose?: () => void;
35
+ /**
36
+ * Pass-through platform props.
37
+ */
38
+ ios?: {};
39
+ android?: {
40
+ /** Material preference ('system' | 'm3'). */
41
+ material?: AndroidMaterialMode;
42
+ };
43
+ /** Test identifier */
44
+ testID?: string;
45
+ }
46
+ export declare function SelectionMenu(props: SelectionMenuProps): React.ReactElement;
47
+ //# sourceMappingURL=SelectionMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionMenu.d.ts","sourceRoot":"","sources":["../../../../src/SelectionMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAA4B,EAC1B,KAAK,mBAAmB,EAEzB,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,yCAAyC;IACzC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAExC;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhE;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAE5B;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,CAAC;IAET,OAAO,CAAC,EAAE;QACR,6CAA6C;QAC7C,QAAQ,CAAC,EAAE,mBAAmB,CAAC;KAChC,CAAC;IAEF,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAeD,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CA4D3E"}
@@ -0,0 +1,78 @@
1
+ import type { CodegenTypes, ViewProps } from 'react-native';
2
+ /**
3
+ * A single option in the menu.
4
+ */
5
+ export type SelectionMenuOption = Readonly<{
6
+ label: string;
7
+ data: string;
8
+ }>;
9
+ /**
10
+ * Event emitted when the user selects an option.
11
+ */
12
+ export type SelectionMenuSelectEvent = Readonly<{
13
+ /** Selected option index (implementation detail; stable for this render) */
14
+ index: CodegenTypes.Int32;
15
+ /** Selected option label */
16
+ label: string;
17
+ /** Selected option data payload (source of truth) */
18
+ data: string;
19
+ }>;
20
+ /** Visibility state (headless mode only). */
21
+ export type SelectionMenuVisible = 'open' | 'closed';
22
+ /** Interactivity state (no booleans). */
23
+ export type SelectionMenuInteractivity = 'enabled' | 'disabled';
24
+ /** Anchor behavior (no booleans). */
25
+ export type SelectionMenuAnchorMode = 'inline' | 'headless';
26
+ /**
27
+ * iOS-specific configuration (reserved).
28
+ */
29
+ export type IOSProps = Readonly<{}>;
30
+ /**
31
+ * Android-specific configuration.
32
+ */
33
+ export type AndroidProps = Readonly<{
34
+ material?: string;
35
+ }>;
36
+ export interface SelectionMenuProps extends ViewProps {
37
+ /**
38
+ * Menu options.
39
+ */
40
+ options: ReadonlyArray<SelectionMenuOption>;
41
+ /**
42
+ * Controlled selection by `data`.
43
+ *
44
+ * - Empty string means "no selection".
45
+ * - Native should treat this as the single source of truth.
46
+ */
47
+ selectedData?: CodegenTypes.WithDefault<string, ''>;
48
+ /**
49
+ * Enabled / disabled state.
50
+ */
51
+ interactivity?: string;
52
+ /**
53
+ * Placeholder text shown when selectedData === "".
54
+ */
55
+ placeholder?: string;
56
+ /**
57
+ * Inline vs headless behavior.
58
+ */
59
+ anchorMode?: string;
60
+ /**
61
+ * Headless mode only:
62
+ * controls visibility.
63
+ */
64
+ visible?: string;
65
+ /**
66
+ * Fired when the user selects an option.
67
+ */
68
+ onSelect?: CodegenTypes.BubblingEventHandler<SelectionMenuSelectEvent>;
69
+ /**
70
+ * Fired when dismissed without selection.
71
+ */
72
+ onRequestClose?: CodegenTypes.BubblingEventHandler<Readonly<{}>>;
73
+ ios?: IOSProps;
74
+ android?: AndroidProps;
75
+ }
76
+ declare const _default: import("react-native/types_generated/Libraries/Utilities/codegenNativeComponent").NativeComponentType<SelectionMenuProps>;
77
+ export default _default;
78
+ //# sourceMappingURL=SelectionMenuNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionMenuNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/SelectionMenuNativeComponent.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AAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;IAEvE;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IAEjE,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;;AAED,wBAA6E"}
@@ -0,0 +1,6 @@
1
+ export * from './DatePicker';
2
+ export * from './SelectionMenu';
3
+ export * from './ContextMenu';
4
+ export * from './SegmentedControl';
5
+ export * from './sharedTypes';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { CodegenTypes } from 'react-native';
2
+ /** Shared "open/closed" control state. */
3
+ export type Visible = 'open' | 'closed';
4
+ /** Shared presentation mode for pickers/menus. */
5
+ export type Presentation = 'modal' | 'embedded';
6
+ /** Shared Material preference (Android). */
7
+ export type AndroidMaterialMode = 'system' | 'm3';
8
+ /** Common event empty payload type. */
9
+ export type EmptyEvent = Readonly<{}>;
10
+ /** Convenience alias (optional). */
11
+ export type Bubbling<T> = CodegenTypes.BubblingEventHandler<T>;
12
+ //# sourceMappingURL=sharedTypes.d.ts.map
@@ -0,0 +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"}