react-native-platform-components 1.3.0 → 1.4.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 (181) hide show
  1. package/README.md +24 -30
  2. package/android/src/main/java/com/platformcomponents/PCButtonGroupView.kt +498 -0
  3. package/android/src/main/java/com/platformcomponents/PCButtonGroupViewManager.kt +191 -0
  4. package/android/src/main/java/com/platformcomponents/PCButtonSupport.kt +127 -0
  5. package/android/src/main/java/com/platformcomponents/PCButtonView.kt +345 -0
  6. package/android/src/main/java/com/platformcomponents/PCButtonViewManager.kt +126 -0
  7. package/android/src/main/java/com/platformcomponents/PCExpressive.kt +107 -0
  8. package/android/src/main/java/com/platformcomponents/PCFloatingToolbarView.kt +115 -0
  9. package/android/src/main/java/com/platformcomponents/PCFloatingToolbarViewManager.kt +65 -0
  10. package/android/src/main/java/com/platformcomponents/PCSegmentedControlView.kt +11 -3
  11. package/android/src/main/java/com/platformcomponents/PCSegmentedControlViewManager.kt +6 -1
  12. package/android/src/main/java/com/platformcomponents/PCTextFieldView.kt +1018 -0
  13. package/android/src/main/java/com/platformcomponents/PCTextFieldViewManager.kt +248 -0
  14. package/android/src/main/java/com/platformcomponents/PlatformComponentsPackage.kt +4 -0
  15. package/android/src/main/res/values/attrs.xml +13 -0
  16. package/android/src/main/res/values/styles.xml +183 -0
  17. package/ios/PCButton.h +10 -0
  18. package/ios/PCButton.mm +196 -0
  19. package/ios/PCButtonGroup.h +10 -0
  20. package/ios/PCButtonGroup.mm +256 -0
  21. package/ios/PCButtonGroupView.swift +254 -0
  22. package/ios/PCButtonSupport.swift +141 -0
  23. package/ios/PCButtonView.swift +155 -0
  24. package/ios/PCFloatingToolbar.h +10 -0
  25. package/ios/PCFloatingToolbar.mm +76 -0
  26. package/ios/PCFloatingToolbarView.swift +95 -0
  27. package/ios/PCTextField.h +10 -0
  28. package/ios/PCTextField.mm +391 -0
  29. package/ios/PCTextFieldView.swift +1012 -0
  30. package/lib/commonjs/Button.js +77 -0
  31. package/lib/commonjs/Button.js.map +1 -0
  32. package/lib/commonjs/ButtonGroup.js +99 -0
  33. package/lib/commonjs/ButtonGroup.js.map +1 -0
  34. package/lib/commonjs/ButtonGroupNativeComponent.ts +121 -0
  35. package/lib/commonjs/ButtonNativeComponent.ts +76 -0
  36. package/lib/commonjs/FloatingToolbar.js +69 -0
  37. package/lib/commonjs/FloatingToolbar.js.map +1 -0
  38. package/lib/commonjs/FloatingToolbarNativeComponent.ts +31 -0
  39. package/lib/commonjs/SegmentedControl.js +11 -85
  40. package/lib/commonjs/SegmentedControl.js.map +1 -1
  41. package/lib/commonjs/SegmentedControlNativeComponent.ts +3 -0
  42. package/lib/commonjs/TextField.js +195 -0
  43. package/lib/commonjs/TextField.js.map +1 -0
  44. package/lib/commonjs/TextFieldNativeComponent.ts +218 -0
  45. package/lib/commonjs/focusRegistry.js +78 -0
  46. package/lib/commonjs/focusRegistry.js.map +1 -0
  47. package/lib/commonjs/icons.js +92 -0
  48. package/lib/commonjs/icons.js.map +1 -0
  49. package/lib/commonjs/index.js +66 -0
  50. package/lib/commonjs/index.js.map +1 -1
  51. package/lib/commonjs/index.web.js +32 -2
  52. package/lib/commonjs/index.web.js.map +1 -1
  53. package/lib/commonjs/labelStyle.js +27 -0
  54. package/lib/commonjs/labelStyle.js.map +1 -0
  55. package/lib/commonjs/reactNativeInternals.d.js +2 -0
  56. package/lib/commonjs/reactNativeInternals.d.js.map +1 -0
  57. package/lib/module/Button.js +70 -0
  58. package/lib/module/Button.js.map +1 -0
  59. package/lib/module/ButtonGroup.js +92 -0
  60. package/lib/module/ButtonGroup.js.map +1 -0
  61. package/lib/module/ButtonGroupNativeComponent.ts +121 -0
  62. package/lib/module/ButtonNativeComponent.ts +76 -0
  63. package/lib/module/FloatingToolbar.js +62 -0
  64. package/lib/module/FloatingToolbar.js.map +1 -0
  65. package/lib/module/FloatingToolbarNativeComponent.ts +31 -0
  66. package/lib/module/SegmentedControl.js +12 -87
  67. package/lib/module/SegmentedControl.js.map +1 -1
  68. package/lib/module/SegmentedControlNativeComponent.ts +3 -0
  69. package/lib/module/TextField.js +189 -0
  70. package/lib/module/TextField.js.map +1 -0
  71. package/lib/module/TextFieldNativeComponent.ts +218 -0
  72. package/lib/module/focusRegistry.js +74 -0
  73. package/lib/module/focusRegistry.js.map +1 -0
  74. package/lib/module/icons.js +87 -0
  75. package/lib/module/icons.js.map +1 -0
  76. package/lib/module/index.js +6 -0
  77. package/lib/module/index.js.map +1 -1
  78. package/lib/module/index.web.js +28 -0
  79. package/lib/module/index.web.js.map +1 -1
  80. package/lib/module/labelStyle.js +23 -0
  81. package/lib/module/labelStyle.js.map +1 -0
  82. package/lib/module/reactNativeInternals.d.js +2 -0
  83. package/lib/module/reactNativeInternals.d.js.map +1 -0
  84. package/lib/typescript/commonjs/docs/sidebars.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/src/Button.d.ts +76 -0
  86. package/lib/typescript/commonjs/src/Button.d.ts.map +1 -0
  87. package/lib/typescript/commonjs/src/ButtonGroup.d.ts +102 -0
  88. package/lib/typescript/commonjs/src/ButtonGroup.d.ts.map +1 -0
  89. package/lib/typescript/commonjs/src/ButtonGroupNativeComponent.d.ts +93 -0
  90. package/lib/typescript/commonjs/src/ButtonGroupNativeComponent.d.ts.map +1 -0
  91. package/lib/typescript/commonjs/src/ButtonNativeComponent.d.ts +57 -0
  92. package/lib/typescript/commonjs/src/ButtonNativeComponent.d.ts.map +1 -0
  93. package/lib/typescript/commonjs/src/FloatingToolbar.d.ts +45 -0
  94. package/lib/typescript/commonjs/src/FloatingToolbar.d.ts.map +1 -0
  95. package/lib/typescript/commonjs/src/FloatingToolbarNativeComponent.d.ts +24 -0
  96. package/lib/typescript/commonjs/src/FloatingToolbarNativeComponent.d.ts.map +1 -0
  97. package/lib/typescript/commonjs/src/SegmentedControl.d.ts +17 -46
  98. package/lib/typescript/commonjs/src/SegmentedControl.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts +2 -0
  100. package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/TextField.d.ts +174 -0
  102. package/lib/typescript/commonjs/src/TextField.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/src/TextFieldNativeComponent.d.ts +162 -0
  104. package/lib/typescript/commonjs/src/TextFieldNativeComponent.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/src/focusRegistry.d.ts +13 -0
  106. package/lib/typescript/commonjs/src/focusRegistry.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/src/icons.d.ts +52 -0
  108. package/lib/typescript/commonjs/src/icons.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/index.d.ts +6 -0
  110. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/src/index.web.d.ts +121 -0
  112. package/lib/typescript/commonjs/src/index.web.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/src/labelStyle.d.ts +20 -0
  114. package/lib/typescript/commonjs/src/labelStyle.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/src/sharedTypes.d.ts +6 -1
  116. package/lib/typescript/commonjs/src/sharedTypes.d.ts.map +1 -1
  117. package/lib/typescript/module/docs/sidebars.d.ts.map +1 -1
  118. package/lib/typescript/module/src/Button.d.ts +76 -0
  119. package/lib/typescript/module/src/Button.d.ts.map +1 -0
  120. package/lib/typescript/module/src/ButtonGroup.d.ts +102 -0
  121. package/lib/typescript/module/src/ButtonGroup.d.ts.map +1 -0
  122. package/lib/typescript/module/src/ButtonGroupNativeComponent.d.ts +93 -0
  123. package/lib/typescript/module/src/ButtonGroupNativeComponent.d.ts.map +1 -0
  124. package/lib/typescript/module/src/ButtonNativeComponent.d.ts +57 -0
  125. package/lib/typescript/module/src/ButtonNativeComponent.d.ts.map +1 -0
  126. package/lib/typescript/module/src/FloatingToolbar.d.ts +45 -0
  127. package/lib/typescript/module/src/FloatingToolbar.d.ts.map +1 -0
  128. package/lib/typescript/module/src/FloatingToolbarNativeComponent.d.ts +24 -0
  129. package/lib/typescript/module/src/FloatingToolbarNativeComponent.d.ts.map +1 -0
  130. package/lib/typescript/module/src/SegmentedControl.d.ts +17 -46
  131. package/lib/typescript/module/src/SegmentedControl.d.ts.map +1 -1
  132. package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts +2 -0
  133. package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts.map +1 -1
  134. package/lib/typescript/module/src/TextField.d.ts +174 -0
  135. package/lib/typescript/module/src/TextField.d.ts.map +1 -0
  136. package/lib/typescript/module/src/TextFieldNativeComponent.d.ts +162 -0
  137. package/lib/typescript/module/src/TextFieldNativeComponent.d.ts.map +1 -0
  138. package/lib/typescript/module/src/focusRegistry.d.ts +13 -0
  139. package/lib/typescript/module/src/focusRegistry.d.ts.map +1 -0
  140. package/lib/typescript/module/src/icons.d.ts +52 -0
  141. package/lib/typescript/module/src/icons.d.ts.map +1 -0
  142. package/lib/typescript/module/src/index.d.ts +6 -0
  143. package/lib/typescript/module/src/index.d.ts.map +1 -1
  144. package/lib/typescript/module/src/index.web.d.ts +121 -0
  145. package/lib/typescript/module/src/index.web.d.ts.map +1 -1
  146. package/lib/typescript/module/src/labelStyle.d.ts +20 -0
  147. package/lib/typescript/module/src/labelStyle.d.ts.map +1 -0
  148. package/lib/typescript/module/src/sharedTypes.d.ts +6 -1
  149. package/lib/typescript/module/src/sharedTypes.d.ts.map +1 -1
  150. package/package.json +25 -4
  151. package/react-native.config.js +3 -0
  152. package/shared/PCButtonComponentDescriptors-custom.h +22 -0
  153. package/shared/PCButtonGroupComponentDescriptors-custom.h +22 -0
  154. package/shared/PCButtonGroupShadowNode-custom.cpp +48 -0
  155. package/shared/PCButtonGroupShadowNode-custom.h +55 -0
  156. package/shared/PCButtonGroupState-custom.h +61 -0
  157. package/shared/PCButtonShadowNode-custom.cpp +48 -0
  158. package/shared/PCButtonShadowNode-custom.h +55 -0
  159. package/shared/PCButtonState-custom.h +61 -0
  160. package/shared/PCTextFieldComponentDescriptors-custom.h +22 -0
  161. package/shared/PCTextFieldShadowNode-custom.cpp +47 -0
  162. package/shared/PCTextFieldShadowNode-custom.h +55 -0
  163. package/shared/PCTextFieldState-custom.h +61 -0
  164. package/shared/react/renderer/components/PlatformComponentsViewSpec/ComponentDescriptors.h +3 -0
  165. package/src/Button.tsx +144 -0
  166. package/src/ButtonGroup.tsx +233 -0
  167. package/src/ButtonGroupNativeComponent.ts +121 -0
  168. package/src/ButtonNativeComponent.ts +76 -0
  169. package/src/FloatingToolbar.tsx +113 -0
  170. package/src/FloatingToolbarNativeComponent.ts +31 -0
  171. package/src/SegmentedControl.tsx +26 -118
  172. package/src/SegmentedControlNativeComponent.ts +3 -0
  173. package/src/TextField.tsx +494 -0
  174. package/src/TextFieldNativeComponent.ts +218 -0
  175. package/src/focusRegistry.ts +89 -0
  176. package/src/icons.ts +116 -0
  177. package/src/index.tsx +6 -0
  178. package/src/index.web.tsx +194 -0
  179. package/src/labelStyle.ts +36 -0
  180. package/src/reactNativeInternals.d.ts +22 -0
  181. package/src/sharedTypes.ts +7 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingToolbar.d.ts","sourceRoot":"","sources":["../../../../src/FloatingToolbar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAItB,mDAAmD;AACnD,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,OAAO,CAAC;AAE3D,0DAA0D;AAC1D,MAAM,MAAM,6BAA6B,GAAG,UAAU,GAAG,SAAS,CAAC;AAEnE,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAExC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,GAAG,CAAC,EAAE;QACJ;;;WAGG;QACH,MAAM,CAAC,EAAE,wBAAwB,CAAC;KACnC,CAAC;IAEF;;OAEG;IACH,OAAO,CAAC,EAAE;QACR;;;WAGG;QACH,OAAO,CAAC,EAAE,6BAA6B,CAAC;KACzC,CAAC;IAEF,gDAAgD;IAChD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,oBAAoB,GAC1B,KAAK,CAAC,YAAY,CAkCpB"}
@@ -0,0 +1,24 @@
1
+ import type { ColorValue, HostComponent, ViewProps } from 'react-native';
2
+ /**
3
+ * iOS-specific configuration.
4
+ */
5
+ export type FloatingToolbarIOSProps = Readonly<{
6
+ /** Glass effect style on iOS 26: 'regular' | 'clear' */
7
+ effect?: string;
8
+ }>;
9
+ /**
10
+ * Android-specific configuration.
11
+ */
12
+ export type FloatingToolbarAndroidProps = Readonly<{
13
+ /** Material color variant: 'standard' | 'vibrant' */
14
+ variant?: string;
15
+ }>;
16
+ export interface FloatingToolbarNativeProps extends ViewProps {
17
+ /** Container color. Default: the platform's toolbar material. */
18
+ color?: ColorValue;
19
+ ios?: FloatingToolbarIOSProps;
20
+ android?: FloatingToolbarAndroidProps;
21
+ }
22
+ declare const _default: HostComponent<FloatingToolbarNativeProps>;
23
+ export default _default;
24
+ //# sourceMappingURL=FloatingToolbarNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingToolbarNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/FloatingToolbarNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;IACjD,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,0BAA2B,SAAQ,SAAS;IAC3D,iEAAiE;IACjE,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB,GAAG,CAAC,EAAE,uBAAuB,CAAC;IAC9B,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC;wBAII,aAAa,CAAC,0BAA0B,CAAC;AAF9C,wBAE+C"}
@@ -1,37 +1,15 @@
1
1
  import React from 'react';
2
- import { type ColorValue, type ImageRequireSource, type ImageURISource, type TextStyle, type ViewProps } from 'react-native';
3
- import { type SegmentedControlSegment as NativeSegment } from './SegmentedControlNativeComponent';
4
- /**
5
- * A single icon source.
6
- *
7
- * - `string`: shorthand for an SF Symbol name on iOS and a drawable resource
8
- * name on Android (the original API).
9
- * - `{ type: 'sfSymbol' }`: an SF Symbol. iOS only; ignored on Android.
10
- * - `{ type: 'drawable' }`: a drawable from the app's `res/drawable`.
11
- * Android only; ignored on iOS.
12
- * - `{ type: 'image' }`: an image asset (`require('./icon.png')`) or a
13
- * `{ uri }` source. Works on both platforms. Images are drawn as tinted
14
- * templates unless `tinted` is `false`.
15
- */
16
- export type SegmentedControlIconSource = string | {
17
- type: 'sfSymbol';
18
- name: string;
19
- } | {
20
- type: 'drawable';
21
- name: string;
22
- } | {
23
- type: 'image';
24
- source: ImageRequireSource | ImageURISource;
25
- tinted?: boolean;
26
- };
2
+ import { type ColorValue, type ViewProps } from 'react-native';
3
+ import { resolveIcon, type PlatformIcon, type PlatformIconSource } from './icons.js';
4
+ import { type LabelStyle } from './labelStyle.js';
5
+ import type { AndroidMaterialStyle } from './sharedTypes.js';
6
+ /** A single icon source. Alias of {@link PlatformIconSource}. */
7
+ export type SegmentedControlIconSource = PlatformIconSource;
27
8
  /**
28
9
  * An icon for a segment: a single source used on both platforms, or a
29
- * per-platform pair so callers don't need to branch on `Platform.OS`.
10
+ * per-platform pair. Alias of {@link PlatformIcon}.
30
11
  */
31
- export type SegmentedControlIcon = SegmentedControlIconSource | {
32
- ios?: SegmentedControlIconSource;
33
- android?: SegmentedControlIconSource;
34
- };
12
+ export type SegmentedControlIcon = PlatformIcon;
35
13
  /**
36
14
  * How labels and icons combine for segments that have an icon.
37
15
  *
@@ -42,15 +20,8 @@ export type SegmentedControlIcon = SegmentedControlIconSource | {
42
20
  * their label. Screen readers still announce the label on both platforms.
43
21
  */
44
22
  export type SegmentedControlLabelVisibility = 'auto' | 'labeled' | 'unlabeled';
45
- /**
46
- * Font for segment labels. Each field falls back to the platform default.
47
- */
48
- export interface SegmentedControlLabelStyle {
49
- fontFamily?: string;
50
- fontSize?: number;
51
- fontWeight?: TextStyle['fontWeight'];
52
- fontStyle?: 'normal' | 'italic';
53
- }
23
+ /** Font for segment labels. Alias of {@link LabelStyle}. */
24
+ export type SegmentedControlLabelStyle = LabelStyle;
54
25
  /**
55
26
  * Badge colors. Both default to the platform look (red with white text).
56
27
  */
@@ -152,16 +123,16 @@ export interface SegmentedControlProps extends ViewProps {
152
123
  rippleColor?: ColorValue;
153
124
  /** Outline color of the segments. */
154
125
  strokeColor?: ColorValue;
126
+ /**
127
+ * Material style: the Material 3 Expressive connected buttons (default),
128
+ * or the classic Material 3 segmented buttons.
129
+ */
130
+ material?: AndroidMaterialStyle;
155
131
  };
156
132
  /** Test identifier */
157
133
  testID?: string;
158
134
  }
159
- type NativeIconFields = Pick<NativeSegment, 'iconType' | 'iconName' | 'iconUri' | 'iconScale' | 'iconTinted'>;
160
- /**
161
- * Flattens the public icon shape into the strings native expects, dropping
162
- * sources that don't apply to the current platform.
163
- */
164
- export declare function resolveSegmentIcon(icon: SegmentedControlIcon | undefined): NativeIconFields;
135
+ /** Flattens a segment icon for native. Alias of {@link resolveIcon}. */
136
+ export declare const resolveSegmentIcon: typeof resolveIcon;
165
137
  export declare function SegmentedControl(props: SegmentedControlProps): React.ReactElement;
166
- export {};
167
138
  //# sourceMappingURL=SegmentedControl.d.ts.map
@@ -1 +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,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAEnB,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAEtB,OAA+B,EAC7B,KAAK,uBAAuB,IAAI,aAAa,EAE9C,MAAM,mCAAmC,CAAC;AAO3C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,0BAA0B,GAClC,MAAM,GACN;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IACE,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,kBAAkB,GAAG,cAAc,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEN;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAC5B,0BAA0B,GAC1B;IACE,GAAG,CAAC,EAAE,0BAA0B,CAAC;IACjC,OAAO,CAAC,EAAE,0BAA0B,CAAC;CACtC,CAAC;AAEN;;;;;;;;GAQG;AACH,MAAM,MAAM,+BAA+B,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACjC;A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AU,CAAC,EAAE,0BAA0B,CAAC;IAExC;;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;;;;WAIG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAE5B,mDAAmD;QACnD,WAAW,CAAC,EAAE,UAAU,CAAC;QAEzB,qCAAqC;QACrC,WAAW,CAAC,EAAE,UAAU,CAAC;QAEzB;;;WAGG;QACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;KACjC,CAAC;IAEF,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,oBAAc,CAAC;AAM9C,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,qBAAqB,GAC3B,KAAK,CAAC,YAAY,CA8GpB"}
@@ -56,6 +56,8 @@ export type IOSProps = Readonly<{
56
56
  export type AndroidProps = Readonly<{
57
57
  /** Whether one segment must always be selected */
58
58
  selectionRequired?: string;
59
+ /** Material style: 'm3' | 'expressive' */
60
+ material?: string;
59
61
  }>;
60
62
  export interface SegmentedControlProps extends ViewProps {
61
63
  /**
@@ -1 +1 @@
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;IAC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,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;IAEjD;;;OAGG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;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,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
+ {"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,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Q,EAAE,aAAa,CAAC,uBAAuB,CAAC,CAAC;IAEjD;;;OAGG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;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,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"}
@@ -0,0 +1,174 @@
1
+ import React from 'react';
2
+ import type { NativeSyntheticEvent, ViewProps } from 'react-native';
3
+ import { type PlatformIcon } from './icons.js';
4
+ import { type LabelStyle } from './labelStyle.js';
5
+ import type { AndroidMaterialMode } from './sharedTypes.js';
6
+ /** Keyboard to show; the React Native `TextInput` values. */
7
+ export type TextFieldKeyboardType = 'default' | 'number-pad' | 'decimal-pad' | 'numeric' | 'email-address' | 'phone-pad' | 'url' | 'ascii-capable' | 'numbers-and-punctuation' | 'name-phone-pad' | 'twitter' | 'web-search' | 'visible-password';
8
+ /** Return key label; the React Native `TextInput` values. */
9
+ export type TextFieldReturnKeyType = 'default' | 'done' | 'go' | 'next' | 'search' | 'send' | 'none' | 'previous';
10
+ /** Autofill hint; a cross-platform subset of the React Native `TextInput` values. */
11
+ export type TextFieldAutoComplete = 'off' | 'username' | 'password' | 'new-password' | 'one-time-code' | 'email' | 'name' | 'given-name' | 'family-name' | 'tel' | 'street-address' | 'postal-code' | 'country' | 'cc-number' | 'cc-exp' | 'cc-csc' | 'url';
12
+ export type TextFieldAutoCapitalize = 'none' | 'sentences' | 'words' | 'characters';
13
+ export type TextFieldClearButtonMode = 'never' | 'while-editing' | 'unless-editing' | 'always';
14
+ /** An iOS text trait: the system default, on, or off. */
15
+ export type TextFieldIOSChoice = 'default' | 'yes' | 'no';
16
+ /** Focus, blur and submit events carry the text at that moment. */
17
+ export type TextFieldEvent = NativeSyntheticEvent<{
18
+ text: string;
19
+ }>;
20
+ /** Change events carry the text and the native edit counter. */
21
+ export type TextFieldChangeEvent = NativeSyntheticEvent<{
22
+ text: string;
23
+ eventCount: number;
24
+ }>;
25
+ /** Methods available through the `ref`. */
26
+ export interface TextFieldRef {
27
+ /** Focuses the field and shows the keyboard. */
28
+ focus(): void;
29
+ /** Removes focus and hides the keyboard. */
30
+ blur(): void;
31
+ /** Clears the text. Fires `onChangeText('')`. */
32
+ clear(): void;
33
+ /** Whether the field currently has focus. */
34
+ isFocused(): boolean;
35
+ }
36
+ export interface TextFieldProps extends Omit<ViewProps, 'onFocus' | 'onBlur' | 'children'> {
37
+ /**
38
+ * Controlled text. Native keeps what the user typed until the next
39
+ * `onChangeText` round-trip, so updating state from `onChangeText` never
40
+ * drops characters.
41
+ */
42
+ value?: string;
43
+ /** Initial text of an uncontrolled field. */
44
+ defaultValue?: string;
45
+ /** Called with the new text on every edit. */
46
+ onChangeText?: (text: string) => void;
47
+ /** Called on every edit with the native event. */
48
+ onChange?: (event: TextFieldChangeEvent) => void;
49
+ /** Called when the field gains focus. */
50
+ onFocus?: (event: TextFieldEvent) => void;
51
+ /** Called when the field loses focus. */
52
+ onBlur?: (event: TextFieldEvent) => void;
53
+ /** Called when the return key is pressed. Single-line fields only. */
54
+ onSubmitEditing?: (event: TextFieldEvent) => void;
55
+ /**
56
+ * Field label. Android: the Material floating label. iOS: a caption above
57
+ * the field, which takes the tint color while focused.
58
+ */
59
+ label?: string;
60
+ /** Placeholder shown while the field is empty. */
61
+ placeholder?: string;
62
+ /** Helper text below the field. */
63
+ supportingText?: string;
64
+ /**
65
+ * Error state. A string is shown below the field in place of the
66
+ * supporting text; `true` marks the field as invalid and keeps the
67
+ * supporting text.
68
+ */
69
+ error?: boolean | string;
70
+ /** Text shown before the input, inside the field (a currency sign). */
71
+ prefix?: string;
72
+ /** Text shown after the input, inside the field (a unit). */
73
+ suffix?: string;
74
+ /** Icon at the start of the field. */
75
+ leadingIcon?: PlatformIcon;
76
+ /** Icon at the end of the field. Pressing it calls `onTrailingIconPress`. */
77
+ trailingIcon?: PlatformIcon;
78
+ /** Called when the trailing icon is pressed. */
79
+ onTrailingIconPress?: () => void;
80
+ /**
81
+ * When to show a clear button inside the field. Default: `'never'`.
82
+ * Android shows the Material clear icon while the field has text.
83
+ */
84
+ clearButtonMode?: TextFieldClearButtonMode;
85
+ /**
86
+ * Shows a button that toggles `secureTextEntry`, for password fields.
87
+ * Android: the Material password toggle. iOS: an eye button.
88
+ */
89
+ passwordToggle?: boolean;
90
+ /** Shows the character count below the field (`12 / 100` with `maxLength`). */
91
+ showCharacterCount?: boolean;
92
+ /** Maximum number of characters. */
93
+ maxLength?: number;
94
+ /** Keyboard to show. Default: `'default'`. */
95
+ keyboardType?: TextFieldKeyboardType;
96
+ /** Return key label. Default: `'default'`. */
97
+ returnKeyType?: TextFieldReturnKeyType;
98
+ /** Automatic capitalization. Default: `'sentences'`. */
99
+ autoCapitalize?: TextFieldAutoCapitalize;
100
+ /** Auto-correction and suggestions. Default: `true`. */
101
+ autoCorrect?: boolean;
102
+ /** Obscures the text, for passwords. */
103
+ secureTextEntry?: boolean;
104
+ /** Multi-line field that grows with its content. Return inserts a newline. */
105
+ multiline?: boolean;
106
+ /** Whether the text can be edited. Default: `true`. */
107
+ editable?: boolean;
108
+ /** Focuses the field when it mounts. */
109
+ autoFocus?: boolean;
110
+ /** Selects all text when the field gains focus. */
111
+ selectTextOnFocus?: boolean;
112
+ /**
113
+ * Autofill hint. Android: autofill hints. iOS: `textContentType`, which
114
+ * also enables the password and one-time-code suggestions.
115
+ */
116
+ autoComplete?: TextFieldAutoComplete;
117
+ /** iOS: keyboard appearance. Default: `'default'`. */
118
+ keyboardAppearance?: 'default' | 'light' | 'dark';
119
+ /** Font of the input text. */
120
+ textStyle?: LabelStyle;
121
+ /** Screen-reader label. Defaults to `label`. */
122
+ accessibilityLabel?: string;
123
+ /**
124
+ * iOS-specific configuration. Each trait defaults to the system default.
125
+ */
126
+ ios?: {
127
+ /**
128
+ * Writing Tools (iOS 18): `'complete'` allows rewrites in place,
129
+ * `'limited'` only the overlay panel, `'none'` disables them.
130
+ */
131
+ writingTools?: 'default' | 'complete' | 'limited' | 'none';
132
+ /** Inline predictive text (iOS 17). */
133
+ inlinePrediction?: TextFieldIOSChoice;
134
+ /** Smart quotes. */
135
+ smartQuotes?: TextFieldIOSChoice;
136
+ /** Smart dashes. */
137
+ smartDashes?: TextFieldIOSChoice;
138
+ /** Smart insert and delete (spaces around pasted words). */
139
+ smartInsertDelete?: TextFieldIOSChoice;
140
+ /** Math expression completion, `1+1=` (iOS 18). */
141
+ mathExpressionCompletion?: TextFieldIOSChoice;
142
+ /** `UITextField.borderStyle`. Default: `'roundedRect'`. */
143
+ borderStyle?: 'roundedRect' | 'none' | 'line' | 'bezel';
144
+ /**
145
+ * Where the label sits: above the field (default), or in a leading
146
+ * column with the field beside it, the layout of the grouped forms in
147
+ * Contacts and Settings. Pair `'leading'` with `borderStyle: 'none'`
148
+ * inside your own grouped row.
149
+ */
150
+ labelPlacement?: 'above' | 'leading';
151
+ /** Width of the leading label column, in points. Default: 100. */
152
+ labelWidth?: number;
153
+ };
154
+ /**
155
+ * Android-specific configuration
156
+ */
157
+ android?: {
158
+ /**
159
+ * Material preference: the Material 3 text field (default), or
160
+ * `'system'` for the platform `EditText` (the hint as placeholder,
161
+ * supporting text below, icons as compound drawables; no box, floating
162
+ * label, clear button, password toggle, counter, prefix or suffix).
163
+ */
164
+ material?: AndroidMaterialMode;
165
+ /** Material 3 text field style. Default: `'outlined'`. */
166
+ variant?: 'outlined' | 'filled';
167
+ /** The dense variant, a shorter field. */
168
+ dense?: boolean;
169
+ };
170
+ /** Test identifier */
171
+ testID?: string;
172
+ }
173
+ export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<TextFieldRef>>;
174
+ //# sourceMappingURL=TextField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/TextField.tsx"],"names":[],"mappings":"AACA,OAAO,KAQN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOpE,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,YAAS,CAAC;AACzD,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,iBAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAe,CAAC;AAEzD,6DAA6D;AAC7D,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,YAAY,GACZ,aAAa,GACb,SAAS,GACT,eAAe,GACf,WAAW,GACX,KAAK,GACL,eAAe,GACf,yBAAyB,GACzB,gBAAgB,GAChB,SAAS,GACT,YAAY,GACZ,kBAAkB,CAAC;AAEvB,6DAA6D;AAC7D,MAAM,MAAM,sBAAsB,GAChC,SAAS,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAE/E,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAC7B,KAA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C;QAEhC,0CAA0C;QAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;IAEF,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,eAAO,MAAM,SAAS,qFAmNrB,CAAC"}
@@ -0,0 +1,162 @@
1
+ import type * as React from 'react';
2
+ import type { HostComponent, ViewProps } from 'react-native';
3
+ import type { BubblingEventHandler, Double, Int32 } from './codegenTypes.js';
4
+ /**
5
+ * Icon fields, pre-resolved on the JS side (see icons.ts).
6
+ */
7
+ export type TextFieldIconProps = Readonly<{
8
+ iconType: string;
9
+ iconName: string;
10
+ iconUri: string;
11
+ iconScale: Double;
12
+ iconTinted: string;
13
+ }>;
14
+ /**
15
+ * Text font. Empty strings / 0 mean "platform default".
16
+ */
17
+ export type TextFieldTextStyleProps = Readonly<{
18
+ fontFamily?: string;
19
+ fontSize?: Double;
20
+ fontWeight?: string;
21
+ fontStyle?: string;
22
+ }>;
23
+ /**
24
+ * Fired on every edit. `eventCount` is the native edit counter that JS hands
25
+ * back with `setText`, so a stale controlled value can't overwrite what the
26
+ * user typed since.
27
+ */
28
+ export type TextFieldChangeEvent = Readonly<{
29
+ text: string;
30
+ eventCount: Int32;
31
+ }>;
32
+ /** Focus, blur and submit carry the text at that moment. */
33
+ export type TextFieldTextEvent = Readonly<{
34
+ text: string;
35
+ }>;
36
+ /**
37
+ * iOS-specific configuration. Every field is '' for the platform default.
38
+ */
39
+ export type TextFieldIOSProps = Readonly<{
40
+ /** 'default' | 'complete' | 'limited' | 'none' (iOS 18) */
41
+ writingTools?: string;
42
+ /** 'default' | 'yes' | 'no' (iOS 17) */
43
+ inlinePrediction?: string;
44
+ /** 'default' | 'yes' | 'no' */
45
+ smartQuotes?: string;
46
+ /** 'default' | 'yes' | 'no' */
47
+ smartDashes?: string;
48
+ /** 'default' | 'yes' | 'no' */
49
+ smartInsertDelete?: string;
50
+ /** 'default' | 'yes' | 'no' (iOS 18) */
51
+ mathExpressionCompletion?: string;
52
+ /** 'roundedRect' | 'none' | 'line' | 'bezel' */
53
+ borderStyle?: string;
54
+ /** 'above' | 'leading': where the label sits */
55
+ labelPlacement?: string;
56
+ /** Width of a leading label column in points; 0 = default */
57
+ labelWidth?: Double;
58
+ }>;
59
+ /**
60
+ * Android-specific configuration.
61
+ */
62
+ export type TextFieldAndroidProps = Readonly<{
63
+ /** 'm3' | 'system' (AndroidMaterialMode) */
64
+ material?: string;
65
+ /** 'outlined' | 'filled' */
66
+ variant?: string;
67
+ /** 'standard' | 'dense' */
68
+ density?: string;
69
+ }>;
70
+ export interface TextFieldNativeProps extends ViewProps {
71
+ /**
72
+ * Text applied when the native view is created. Later updates go through
73
+ * the `setText` command so they can be checked against `eventCount`.
74
+ */
75
+ initialText?: string;
76
+ /** Floating label (Android) / caption above the field (iOS). */
77
+ label?: string;
78
+ /** Placeholder shown while the field is empty. */
79
+ placeholder?: string;
80
+ /** Helper text below the field. */
81
+ supportingText?: string;
82
+ /** 'none' | 'error' */
83
+ errorState?: string;
84
+ /** Error message shown instead of the supporting text. */
85
+ errorText?: string;
86
+ /** Text shown before the input, inside the field. */
87
+ prefix?: string;
88
+ /** Text shown after the input, inside the field. */
89
+ suffix?: string;
90
+ /** Icon at the start of the field. */
91
+ leadingIcon?: TextFieldIconProps;
92
+ /** Icon at the end of the field; pressing it fires onTrailingIconPress. */
93
+ trailingIcon?: TextFieldIconProps;
94
+ /** 'never' | 'while-editing' | 'unless-editing' | 'always' */
95
+ clearButtonMode?: string;
96
+ /** 'shown' | 'hidden': a button that toggles secure text entry. */
97
+ passwordToggle?: string;
98
+ /** 'shown' | 'hidden': the character counter. */
99
+ characterCount?: string;
100
+ /** Maximum number of UTF-16 characters; 0 = unlimited. */
101
+ maxLength?: Int32;
102
+ /** React Native keyboardType value. */
103
+ keyboardType?: string;
104
+ /** React Native returnKeyType value. */
105
+ returnKeyType?: string;
106
+ /** 'none' | 'sentences' | 'words' | 'characters' */
107
+ autoCapitalize?: string;
108
+ /** 'enabled' | 'disabled' */
109
+ autoCorrect?: string;
110
+ /** 'secure' | 'plain' */
111
+ secureTextEntry?: string;
112
+ /** 'single' | 'multiline' */
113
+ lines?: string;
114
+ /** 'enabled' | 'disabled' */
115
+ interactivity?: string;
116
+ /** 'focus' | 'none': focus the field when it mounts. */
117
+ autoFocus?: string;
118
+ /** 'select' | 'keep': select all text on focus. */
119
+ selectTextOnFocus?: string;
120
+ /** React Native autoComplete value; '' = platform default. */
121
+ autoComplete?: string;
122
+ /** 'default' | 'light' | 'dark' (iOS keyboard appearance) */
123
+ keyboardAppearance?: string;
124
+ /** Font of the input text. */
125
+ textStyle?: TextFieldTextStyleProps;
126
+ /**
127
+ * Screen-reader label, applied to the native field rather than the host
128
+ * view. Empty means "use the label".
129
+ */
130
+ spokenLabel?: string;
131
+ ios?: TextFieldIOSProps;
132
+ android?: TextFieldAndroidProps;
133
+ /** Fired on every user edit. */
134
+ onFieldChange?: BubblingEventHandler<TextFieldChangeEvent>;
135
+ /** Fired when the field gains focus. */
136
+ onFieldFocus?: BubblingEventHandler<TextFieldTextEvent>;
137
+ /** Fired when the field loses focus. */
138
+ onFieldBlur?: BubblingEventHandler<TextFieldTextEvent>;
139
+ /** Fired when the keyboard's return key is pressed (single-line). */
140
+ onFieldSubmit?: BubblingEventHandler<TextFieldTextEvent>;
141
+ /** Fired when the trailing icon is pressed. */
142
+ onTrailingIconPress?: BubblingEventHandler<Readonly<{}>>;
143
+ }
144
+ type NativeTextFieldComponent = HostComponent<TextFieldNativeProps>;
145
+ interface NativeCommands {
146
+ /** Focuses the field and shows the keyboard. */
147
+ focus: (viewRef: React.ElementRef<NativeTextFieldComponent>) => void;
148
+ /** Removes focus and hides the keyboard. */
149
+ blur: (viewRef: React.ElementRef<NativeTextFieldComponent>) => void;
150
+ /** Clears the text; fires onFieldChange like a user edit. */
151
+ clear: (viewRef: React.ElementRef<NativeTextFieldComponent>) => void;
152
+ /**
153
+ * Replaces the text, unless the user has edited since `eventCount` was
154
+ * reported, in which case the update is dropped and the next edit event
155
+ * brings JS back in sync.
156
+ */
157
+ setText: (viewRef: React.ElementRef<NativeTextFieldComponent>, eventCount: Int32, text: string) => void;
158
+ }
159
+ export declare const Commands: NativeCommands;
160
+ declare const _default: NativeTextFieldComponent;
161
+ export default _default;
162
+ //# sourceMappingURL=TextFieldNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextFieldNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/TextFieldNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,mBAAgB,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,KAAK,CAAC;CACnB,CAAC,CAAC;AAEH,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AA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xC,WAAW,CAAC,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;IAEvD,qEAAqE;IACrE,aAAa,CAAC,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;IAEzD,+CAA+C;IAC/C,mBAAmB,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;CAC1D;AAED,KAAK,wBAAwB,GAAG,aAAa,CAAC,oBAAoB,CAAC,CAAC;AAIpE,UAAU,cAAc;IACtB,gDAAgD;IAChD,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAErE,4CAA4C;IAC5C,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAEpE,6DAA6D;IAC7D,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAErE;;;;OAIG;IACH,OAAO,EAAE,CACP,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAAC,EACnD,UAAU,EAAE,KAAK,EACjB,IAAI,EAAE,MAAM,KACT,IAAI,CAAC;CACX;AAED,eAAO,MAAM,QAAQ,EAAE,cAErB,CAAC;wBAIE,wBAAwB;AAF7B,wBAE8B"}
@@ -0,0 +1,13 @@
1
+ type HostNode = object;
2
+ export declare const focusRegistry: {
3
+ /** Called when the field mounts. */
4
+ register(node: HostNode): void;
5
+ /** Called when the field unmounts; drops the focus if the field held it. */
6
+ unregister(node: HostNode): void;
7
+ /** The field gained focus natively. */
8
+ focused(node: HostNode | null): void;
9
+ /** The field lost focus natively. */
10
+ blurred(node: HostNode | null): void;
11
+ };
12
+ export {};
13
+ //# sourceMappingURL=focusRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focusRegistry.d.ts","sourceRoot":"","sources":["../../../../src/focusRegistry.ts"],"names":[],"mappings":"AAkBA,KAAK,QAAQ,GAAG,MAAM,CAAC;AA0BvB,eAAO,MAAM,aAAa;IACxB,oCAAoC;mBACrB,QAAQ,GAAG,IAAI;IAQ9B,4EAA4E;qBAC3D,QAAQ,GAAG,IAAI;IAYhC,uCAAuC;kBACzB,QAAQ,GAAG,IAAI,GAAG,IAAI;IAUpC,qCAAqC;kBACvB,QAAQ,GAAG,IAAI,GAAG,IAAI;CASrC,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { type ImageRequireSource, type ImageURISource } from 'react-native';
2
+ /**
3
+ * A single icon source.
4
+ *
5
+ * - `string`: shorthand for an SF Symbol name on iOS and a drawable resource
6
+ * name on Android.
7
+ * - `{ type: 'sfSymbol' }`: an SF Symbol. iOS only; ignored on Android.
8
+ * - `{ type: 'drawable' }`: a drawable from the app's `res/drawable`.
9
+ * Android only; ignored on iOS.
10
+ * - `{ type: 'image' }`: an image asset (`require('./icon.png')`) or a
11
+ * `{ uri }` source. Works on both platforms. Images are drawn as tinted
12
+ * templates unless `tinted` is `false`.
13
+ */
14
+ export type PlatformIconSource = string | {
15
+ type: 'sfSymbol';
16
+ name: string;
17
+ } | {
18
+ type: 'drawable';
19
+ name: string;
20
+ } | {
21
+ type: 'image';
22
+ source: ImageRequireSource | ImageURISource;
23
+ tinted?: boolean;
24
+ };
25
+ /**
26
+ * An icon: a single source used on both platforms, or a per-platform pair so
27
+ * callers don't need to branch on `Platform.OS`.
28
+ */
29
+ export type PlatformIcon = PlatformIconSource | {
30
+ ios?: PlatformIconSource;
31
+ android?: PlatformIconSource;
32
+ };
33
+ /** The flat icon fields the native specs expect. */
34
+ export type NativeIconFields = {
35
+ /** '' | 'sfSymbol' | 'drawable' | 'image' */
36
+ iconType: string;
37
+ /** SF Symbol (iOS) or drawable resource name (Android) */
38
+ iconName: string;
39
+ /** Resolved image URI when iconType === 'image' */
40
+ iconUri: string;
41
+ /** Resolved image scale when iconType === 'image' */
42
+ iconScale: number;
43
+ /** 'true' | 'false': draw the image as a tinted template */
44
+ iconTinted: string;
45
+ };
46
+ export declare const NO_ICON: NativeIconFields;
47
+ /**
48
+ * Flattens the public icon shape into the strings native expects, dropping
49
+ * sources that don't apply to the current platform.
50
+ */
51
+ export declare function resolveIcon(icon: PlatformIcon | undefined): NativeIconFields;
52
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../src/icons.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IACE,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,kBAAkB,GAAG,cAAc,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEN;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB,kBAAkB,GAClB;IACE,GAAG,CAAC,EAAE,kBAAkB,CAAC;IACzB,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEN,oDAAoD;AACpD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,gBAMrB,CAAC;AAWF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,gBAAgB,CAoC5E"}
@@ -2,7 +2,13 @@ export * from './DatePicker.js';
2
2
  export * from './SelectionMenu.js';
3
3
  export * from './ContextMenu.js';
4
4
  export * from './SegmentedControl.js';
5
+ export * from './Button.js';
6
+ export * from './ButtonGroup.js';
7
+ export * from './FloatingToolbar.js';
5
8
  export * from './LiquidGlass.js';
9
+ export * from './TextField.js';
10
+ export * from './icons.js';
11
+ export * from './labelStyle.js';
6
12
  export * from './sharedTypes.js';
7
13
  export * from './NativeTheme.js';
8
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAc,CAAC;AAC7B,cAAc,oBAAiB,CAAC;AAChC,cAAc,kBAAe,CAAC;AAC9B,cAAc,uBAAoB,CAAC;AACnC,cAAc,kBAAe,CAAC;AAC9B,cAAc,kBAAe,CAAC;AAC9B,cAAc,kBAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAc,CAAC;AAC7B,cAAc,oBAAiB,CAAC;AAChC,cAAc,kBAAe,CAAC;AAC9B,cAAc,uBAAoB,CAAC;AACnC,cAAc,aAAU,CAAC;AACzB,cAAc,kBAAe,CAAC;AAC9B,cAAc,sBAAmB,CAAC;AAClC,cAAc,kBAAe,CAAC;AAC9B,cAAc,gBAAa,CAAC;AAC5B,cAAc,YAAS,CAAC;AACxB,cAAc,iBAAc,CAAC;AAC7B,cAAc,kBAAe,CAAC;AAC9B,cAAc,kBAAe,CAAC"}