@expo/ui 56.0.16 → 56.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +40 -6
- package/android/src/main/java/expo/modules/ui/HostView.kt +0 -2
- package/android/src/main/java/expo/modules/ui/ModalBottomSheetView.kt +14 -0
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +20 -0
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +182 -6
- package/android/src/main/java/expo/modules/ui/textfield/BasicTextField.kt +203 -0
- package/android/src/main/java/expo/modules/ui/{TextFieldView.kt → textfield/TextField.kt} +34 -248
- package/android/src/main/java/expo/modules/ui/textfield/TextFieldShared.kt +299 -0
- package/build/State/useNativeState.d.ts +8 -3
- package/build/State/useNativeState.d.ts.map +1 -1
- package/build/community/bottom-sheet/BottomSheet.android.d.ts.map +1 -1
- package/build/community/pager-view/PagerView.android.d.ts.map +1 -1
- package/build/jetpack-compose/ModalBottomSheet/index.d.ts +6 -0
- package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -1
- package/build/jetpack-compose/RNHostView/index.d.ts +8 -0
- package/build/jetpack-compose/RNHostView/index.d.ts.map +1 -1
- package/build/jetpack-compose/TextField/BasicTextField.d.ts +36 -0
- package/build/jetpack-compose/TextField/BasicTextField.d.ts.map +1 -0
- package/build/jetpack-compose/TextField/TextField.d.ts +131 -0
- package/build/jetpack-compose/TextField/TextField.d.ts.map +1 -0
- package/build/jetpack-compose/TextField/index.d.ts +3 -244
- package/build/jetpack-compose/TextField/index.d.ts.map +1 -1
- package/build/jetpack-compose/TextField/shared.d.ts +171 -0
- package/build/jetpack-compose/TextField/shared.d.ts.map +1 -0
- package/build/jetpack-compose/index.d.ts +1 -1
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +11 -0
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/Image/index.d.ts +3 -1
- package/build/swift-ui/Image/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +34 -5
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/widgets.d.ts +7 -0
- package/build/swift-ui/modifiers/widgets.d.ts.map +1 -1
- package/build/universal/Button/index.ios.d.ts.map +1 -1
- package/build/universal/FieldGroup/FieldSectionSlots.d.ts.map +1 -1
- package/build/universal/FieldGroup/groupChildren.d.ts.map +1 -1
- package/build/universal/Text/index.ios.d.ts.map +1 -1
- package/build/universal/TextInput/index.android.d.ts.map +1 -1
- package/build/universal/TextInput/types.d.ts +5 -1
- package/build/universal/TextInput/types.d.ts.map +1 -1
- package/build/universal/modifierUtils.d.ts +16 -0
- package/build/universal/modifierUtils.d.ts.map +1 -0
- package/build/universal/transformStyle.android.d.ts +3 -0
- package/build/universal/transformStyle.android.d.ts.map +1 -1
- package/build/universal/transformStyle.ios.d.ts +3 -0
- package/build/universal/transformStyle.ios.d.ts.map +1 -1
- package/build/universal/types.d.ts +2 -0
- package/build/universal/types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/ImageView.swift +1 -5
- package/ios/Modifiers/ImageScaleModifier.swift +29 -0
- package/ios/Modifiers/OnGeometryChangeModifier.swift +8 -16
- package/ios/Modifiers/ViewModifierRegistry.swift +36 -0
- package/ios/Modifiers/WidgetModifiers.swift +12 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.16/expo.modules.ui-56.0.16-sources.jar → 56.0.18/expo.modules.ui-56.0.18-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.16/expo.modules.ui-56.0.16.module → 56.0.18/expo.modules.ui-56.0.18.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.16/expo.modules.ui-56.0.16.pom → 56.0.18/expo.modules.ui-56.0.18.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
- package/package.json +3 -3
- package/src/State/index.fx.ts +4 -1
- package/src/State/useNativeState.ts +24 -5
- package/src/community/bottom-sheet/BottomSheet.android.tsx +2 -13
- package/src/community/bottom-sheet/BottomSheet.ios.tsx +1 -1
- package/src/community/datetime-picker/DateTimePicker.tsx +1 -1
- package/src/community/menu/MenuView.ios.tsx +1 -1
- package/src/community/pager-view/PagerView.android.tsx +21 -3
- package/src/community/pager-view/PagerView.ios.tsx +1 -1
- package/src/community/picker/Picker.ios.tsx +1 -1
- package/src/community/slider/Slider.ios.tsx +1 -1
- package/src/jetpack-compose/ModalBottomSheet/index.tsx +7 -0
- package/src/jetpack-compose/RNHostView/index.tsx +8 -0
- package/src/jetpack-compose/TextField/BasicTextField.tsx +118 -0
- package/src/jetpack-compose/TextField/TextField.tsx +198 -0
- package/src/jetpack-compose/TextField/index.ts +19 -0
- package/src/jetpack-compose/TextField/{index.tsx → shared.ts} +71 -203
- package/src/jetpack-compose/index.ts +6 -0
- package/src/jetpack-compose/modifiers/index.ts +13 -0
- package/src/swift-ui/BottomSheet/index.tsx +1 -1
- package/src/swift-ui/Image/index.tsx +12 -3
- package/src/swift-ui/modifiers/index.ts +44 -6
- package/src/swift-ui/modifiers/widgets.ts +9 -0
- package/src/universal/Button/index.ios.tsx +6 -1
- package/src/universal/FieldGroup/FieldSectionSlots.tsx +3 -0
- package/src/universal/FieldGroup/groupChildren.tsx +3 -0
- package/src/universal/Text/index.ios.tsx +3 -1
- package/src/universal/TextInput/index.android.tsx +26 -60
- package/src/universal/TextInput/types.ts +5 -1
- package/src/universal/modifierUtils.ts +23 -0
- package/src/universal/transformStyle.android.ts +9 -1
- package/src/universal/transformStyle.ios.ts +9 -1
- package/src/universal/types.ts +2 -0
- package/android/src/main/java/expo/modules/ui/ShadowNodeSyncFlush.kt +0 -28
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.sha512 +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNativeState.d.ts","sourceRoot":"","sources":["../../src/State/useNativeState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAA4B,MAAM,mBAAmB,CAAC;AAOhF;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,YAAY,GAAG;IAC9C;;;;;;OAMG;IACH,KAAK,EAAE,CAAC,CAAC;IAET
|
|
1
|
+
{"version":3,"file":"useNativeState.d.ts","sourceRoot":"","sources":["../../src/State/useNativeState.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAA4B,MAAM,mBAAmB,CAAC;AAOhF;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,YAAY,GAAG;IAC9C;;;;;;OAMG;IACH,KAAK,EAAE,CAAC,CAAC;IAET;;OAEG;IACH,GAAG,IAAI,CAAC,CAAC;IAET;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;CAC3D,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAQrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.android.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.android.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAqC3C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"BottomSheet.android.d.ts","sourceRoot":"","sources":["../../../src/community/bottom-sheet/BottomSheet.android.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAqC3C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA2JlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PagerView.android.d.ts","sourceRoot":"","sources":["../../../src/community/pager-view/PagerView.android.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAO/D;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"PagerView.android.d.ts","sourceRoot":"","sources":["../../../src/community/pager-view/PagerView.android.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAO/D;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CA8H9C"}
|
|
@@ -49,6 +49,12 @@ export type ModalBottomSheetProps = {
|
|
|
49
49
|
* @default false
|
|
50
50
|
*/
|
|
51
51
|
skipPartiallyExpanded?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Opens the sheet fully expanded on first composition. Ignored when `skipPartiallyExpanded` is `true`.
|
|
54
|
+
* @default false
|
|
55
|
+
* @platform android
|
|
56
|
+
*/
|
|
57
|
+
initialFullyExpanded?: boolean;
|
|
52
58
|
/**
|
|
53
59
|
* The background color of the bottom sheet.
|
|
54
60
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/ModalBottomSheet/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAiB,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAUlD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B;;;OAGG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC/B;;;OAGG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;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,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAmCF;;GAEG;AACH,iBAAS,yBAAyB,CAAC,KAAK,EAAE,qBAAqB,2CAE9D;kBAFQ,yBAAyB;4BAPP;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE;;AAalD,eAAO,MAAM,gBAAgB,kCAA4B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
import type { ModifierConfig } from '../../types';
|
|
3
4
|
import type { PrimitiveBaseProps } from '../layout';
|
|
4
5
|
export interface RNHostProps extends PrimitiveBaseProps {
|
|
@@ -17,6 +18,13 @@ export interface RNHostProps extends PrimitiveBaseProps {
|
|
|
17
18
|
* Modifiers for the component.
|
|
18
19
|
*/
|
|
19
20
|
modifiers?: ModifierConfig[];
|
|
21
|
+
/**
|
|
22
|
+
* Style applied to the host view's React Native shadow node. Useful for
|
|
23
|
+
* controlling its layout position (e.g. `position: 'absolute'`) so the shadow
|
|
24
|
+
* layout matches where the hosting Compose component draws the content —
|
|
25
|
+
* important for `measure()`-based hit-testing such as `Pressable`.
|
|
26
|
+
*/
|
|
27
|
+
style?: StyleProp<ViewStyle>;
|
|
20
28
|
}
|
|
21
29
|
export declare function RNHostView(props: RNHostProps): import("react/jsx-runtime").JSX.Element;
|
|
22
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/RNHostView/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B;AAiBD,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,2CAS5C"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/RNHostView/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAiBD,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,2CAS5C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ColorValue } from 'react-native';
|
|
2
|
+
import { type CommonTextFieldProperties, type TextFieldRef } from './shared';
|
|
3
|
+
/**
|
|
4
|
+
* Imperative methods for `BasicTextField`. Identical to {@link TextFieldRef}.
|
|
5
|
+
*/
|
|
6
|
+
export type BasicTextFieldRef = TextFieldRef;
|
|
7
|
+
/**
|
|
8
|
+
* Props for `BasicTextField`. Mirrors Compose's `BasicTextField`: a bare,
|
|
9
|
+
* unstyled text field with no Material chrome (no container, indicator, or
|
|
10
|
+
* built-in padding). Shares {@link CommonTextFieldProperties} with `TextField` and
|
|
11
|
+
* `OutlinedTextField`; use `BasicTextField.DecorationBox` to add your own
|
|
12
|
+
* decoration.
|
|
13
|
+
*/
|
|
14
|
+
export type BasicTextFieldProps = CommonTextFieldProperties & {
|
|
15
|
+
/**
|
|
16
|
+
* Color of the text cursor. Maps to Compose's `cursorBrush` via
|
|
17
|
+
* `SolidColor(color)`. Defaults to the theme's primary color
|
|
18
|
+
* (`MaterialTheme.colorScheme.primary`) so it stays visible in light and dark.
|
|
19
|
+
*/
|
|
20
|
+
cursorColor?: ColorValue;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* A bare, unstyled Compose `BasicTextField` with no Material decoration.
|
|
24
|
+
*/
|
|
25
|
+
declare function BasicTextFieldComponent(props: BasicTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare namespace BasicTextFieldComponent {
|
|
27
|
+
var DecorationBox: (props: {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
var InnerTextField: () => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
var Placeholder: (props: {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
export { BasicTextFieldComponent as BasicTextField };
|
|
36
|
+
//# sourceMappingURL=BasicTextField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicTextField.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/TextField/BasicTextField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,YAAY,EAElB,MAAM,UAAU,CAAC;AAKlB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,GAAG;IAC5D;;;;OAIG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B,CAAC;AAwEF;;GAEG;AACH,iBAAS,uBAAuB,CAAC,KAAK,EAAE,mBAAmB,2CAE1D;kBAFQ,uBAAuB;+BA/BF;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;;6BAoB/B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;;AAqBzD,OAAO,EAAE,uBAAuB,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { ColorValue } from 'react-native';
|
|
2
|
+
import { type CommonTextFieldProperties } from './shared';
|
|
3
|
+
import { type ObservableState } from '../../State';
|
|
4
|
+
import { type ShapeJSXElement } from '../Shape';
|
|
5
|
+
/**
|
|
6
|
+
* Colors for `TextField` and `OutlinedTextField`.
|
|
7
|
+
* Maps to `TextFieldColors` in Compose, shared by both variants.
|
|
8
|
+
*/
|
|
9
|
+
export type TextFieldColors = {
|
|
10
|
+
focusedTextColor?: ColorValue;
|
|
11
|
+
unfocusedTextColor?: ColorValue;
|
|
12
|
+
disabledTextColor?: ColorValue;
|
|
13
|
+
errorTextColor?: ColorValue;
|
|
14
|
+
focusedContainerColor?: ColorValue;
|
|
15
|
+
unfocusedContainerColor?: ColorValue;
|
|
16
|
+
disabledContainerColor?: ColorValue;
|
|
17
|
+
errorContainerColor?: ColorValue;
|
|
18
|
+
cursorColor?: ColorValue;
|
|
19
|
+
errorCursorColor?: ColorValue;
|
|
20
|
+
focusedIndicatorColor?: ColorValue;
|
|
21
|
+
unfocusedIndicatorColor?: ColorValue;
|
|
22
|
+
disabledIndicatorColor?: ColorValue;
|
|
23
|
+
errorIndicatorColor?: ColorValue;
|
|
24
|
+
focusedLeadingIconColor?: ColorValue;
|
|
25
|
+
unfocusedLeadingIconColor?: ColorValue;
|
|
26
|
+
disabledLeadingIconColor?: ColorValue;
|
|
27
|
+
errorLeadingIconColor?: ColorValue;
|
|
28
|
+
focusedTrailingIconColor?: ColorValue;
|
|
29
|
+
unfocusedTrailingIconColor?: ColorValue;
|
|
30
|
+
disabledTrailingIconColor?: ColorValue;
|
|
31
|
+
errorTrailingIconColor?: ColorValue;
|
|
32
|
+
focusedLabelColor?: ColorValue;
|
|
33
|
+
unfocusedLabelColor?: ColorValue;
|
|
34
|
+
disabledLabelColor?: ColorValue;
|
|
35
|
+
errorLabelColor?: ColorValue;
|
|
36
|
+
focusedPlaceholderColor?: ColorValue;
|
|
37
|
+
unfocusedPlaceholderColor?: ColorValue;
|
|
38
|
+
disabledPlaceholderColor?: ColorValue;
|
|
39
|
+
errorPlaceholderColor?: ColorValue;
|
|
40
|
+
focusedSupportingTextColor?: ColorValue;
|
|
41
|
+
unfocusedSupportingTextColor?: ColorValue;
|
|
42
|
+
disabledSupportingTextColor?: ColorValue;
|
|
43
|
+
errorSupportingTextColor?: ColorValue;
|
|
44
|
+
focusedPrefixColor?: ColorValue;
|
|
45
|
+
unfocusedPrefixColor?: ColorValue;
|
|
46
|
+
disabledPrefixColor?: ColorValue;
|
|
47
|
+
errorPrefixColor?: ColorValue;
|
|
48
|
+
focusedSuffixColor?: ColorValue;
|
|
49
|
+
unfocusedSuffixColor?: ColorValue;
|
|
50
|
+
disabledSuffixColor?: ColorValue;
|
|
51
|
+
errorSuffixColor?: ColorValue;
|
|
52
|
+
};
|
|
53
|
+
export type TextFieldProps = CommonTextFieldProperties & {
|
|
54
|
+
/** @default false */
|
|
55
|
+
isError?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Shape used for the field's container outline/fill. Use the helpers from
|
|
58
|
+
* `Shape` (for example, `<Shape.Pill />` or `<Shape.RoundedCorner cornerRadii={...} />`).
|
|
59
|
+
* Defaults to the Material `OutlinedTextFieldDefaults.shape`/`TextFieldDefaults.shape`.
|
|
60
|
+
*/
|
|
61
|
+
shape?: ShapeJSXElement;
|
|
62
|
+
colors?: TextFieldColors;
|
|
63
|
+
};
|
|
64
|
+
export type OutlinedTextFieldProps = CommonTextFieldProperties & {
|
|
65
|
+
/** @default false */
|
|
66
|
+
isError?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Shape used for the field's container outline/fill. Use the helpers from
|
|
69
|
+
* `Shape` (for example, `<Shape.Pill />` or `<Shape.RoundedCorner cornerRadii={...} />`).
|
|
70
|
+
* Defaults to the Material `OutlinedTextFieldDefaults.shape`/`TextFieldDefaults.shape`.
|
|
71
|
+
*/
|
|
72
|
+
shape?: ShapeJSXElement;
|
|
73
|
+
colors?: TextFieldColors;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* A Material3 `TextField`.
|
|
77
|
+
*/
|
|
78
|
+
declare function TextFieldComponent(props: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
declare namespace TextFieldComponent {
|
|
80
|
+
var Label: (props: {
|
|
81
|
+
children: React.ReactNode;
|
|
82
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
var Placeholder: (props: {
|
|
84
|
+
children: React.ReactNode;
|
|
85
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
var LeadingIcon: (props: {
|
|
87
|
+
children: React.ReactNode;
|
|
88
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
var TrailingIcon: (props: {
|
|
90
|
+
children: React.ReactNode;
|
|
91
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
92
|
+
var Prefix: (props: {
|
|
93
|
+
children: React.ReactNode;
|
|
94
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
var Suffix: (props: {
|
|
96
|
+
children: React.ReactNode;
|
|
97
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
98
|
+
var SupportingText: (props: {
|
|
99
|
+
children: React.ReactNode;
|
|
100
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A Material3 `OutlinedTextField` with a transparent background and border outline.
|
|
104
|
+
*/
|
|
105
|
+
declare function OutlinedTextFieldComponent(props: OutlinedTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
declare namespace OutlinedTextFieldComponent {
|
|
107
|
+
var Label: (props: {
|
|
108
|
+
children: React.ReactNode;
|
|
109
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
110
|
+
var Placeholder: (props: {
|
|
111
|
+
children: React.ReactNode;
|
|
112
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
113
|
+
var LeadingIcon: (props: {
|
|
114
|
+
children: React.ReactNode;
|
|
115
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
116
|
+
var TrailingIcon: (props: {
|
|
117
|
+
children: React.ReactNode;
|
|
118
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
119
|
+
var Prefix: (props: {
|
|
120
|
+
children: React.ReactNode;
|
|
121
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
122
|
+
var Suffix: (props: {
|
|
123
|
+
children: React.ReactNode;
|
|
124
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
125
|
+
var SupportingText: (props: {
|
|
126
|
+
children: React.ReactNode;
|
|
127
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
128
|
+
}
|
|
129
|
+
export { TextFieldComponent as TextField, OutlinedTextFieldComponent as OutlinedTextField };
|
|
130
|
+
export { type ObservableState };
|
|
131
|
+
//# sourceMappingURL=TextField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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nCL;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;6BAIvB;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;6BAI7B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;8BAI5B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;wBAInC;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;wBAI7B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;gCAIrB;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;;AAuB5D;;GAEG;AACH,iBAAS,0BAA0B,CAAC,KAAK,EAAE,sBAAsB,2CAEhE;kBAFQ,0BAA0B;uBAlDb;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;6BAIvB;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;6BAI7B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;8BAI5B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;wBAInC;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;wBAI7B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;gCAIrB;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;;AAwC5D,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,0BAA0B,IAAI,iBAAiB,EAAE,CAAC;AAG5F,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -1,245 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import type { ModifierConfig } from '../../types';
|
|
5
|
-
import { type ShapeJSXElement } from '../Shape';
|
|
6
|
-
/**
|
|
7
|
-
* Can be used for imperatively focusing and setting text/selection on the `TextField` component.
|
|
8
|
-
*/
|
|
9
|
-
export type TextFieldRef = {
|
|
10
|
-
setText: (newText: string) => Promise<void>;
|
|
11
|
-
/** Clear the current text. */
|
|
12
|
-
clear: () => Promise<void>;
|
|
13
|
-
focus: () => Promise<void>;
|
|
14
|
-
blur: () => Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Programmatically set the selection range.
|
|
17
|
-
*/
|
|
18
|
-
setSelection: (start: number, end: number) => Promise<void>;
|
|
19
|
-
};
|
|
20
|
-
export type TextFieldCapitalization = 'none' | 'characters' | 'words' | 'sentences';
|
|
21
|
-
export type TextFieldKeyboardType = 'text' | 'number' | 'email' | 'phone' | 'decimal' | 'password' | 'ascii' | 'uri' | 'numberPassword';
|
|
22
|
-
export type TextFieldImeAction = 'default' | 'none' | 'go' | 'search' | 'send' | 'previous' | 'next' | 'done';
|
|
23
|
-
/**
|
|
24
|
-
* Keyboard options matching Compose `KeyboardOptions`.
|
|
25
|
-
*/
|
|
26
|
-
export type TextFieldKeyboardOptions = {
|
|
27
|
-
/** @default 'none' */
|
|
28
|
-
capitalization?: TextFieldCapitalization;
|
|
29
|
-
/** @default true */
|
|
30
|
-
autoCorrectEnabled?: boolean;
|
|
31
|
-
/** @default 'text' */
|
|
32
|
-
keyboardType?: TextFieldKeyboardType;
|
|
33
|
-
/** @default 'default' */
|
|
34
|
-
imeAction?: TextFieldImeAction;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Keyboard actions matching Compose `KeyboardActions`.
|
|
38
|
-
* The triggered callback depends on the `imeAction` in `keyboardOptions`.
|
|
39
|
-
*/
|
|
40
|
-
export type TextFieldKeyboardActions = {
|
|
41
|
-
onDone?: (value: string) => void;
|
|
42
|
-
onGo?: (value: string) => void;
|
|
43
|
-
onNext?: (value: string) => void;
|
|
44
|
-
onPrevious?: (value: string) => void;
|
|
45
|
-
onSearch?: (value: string) => void;
|
|
46
|
-
onSend?: (value: string) => void;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Colors for `TextField` and `OutlinedTextField`.
|
|
50
|
-
* Maps to `TextFieldColors` in Compose, shared by both variants.
|
|
51
|
-
*/
|
|
52
|
-
export type TextFieldColors = {
|
|
53
|
-
focusedTextColor?: ColorValue;
|
|
54
|
-
unfocusedTextColor?: ColorValue;
|
|
55
|
-
disabledTextColor?: ColorValue;
|
|
56
|
-
errorTextColor?: ColorValue;
|
|
57
|
-
focusedContainerColor?: ColorValue;
|
|
58
|
-
unfocusedContainerColor?: ColorValue;
|
|
59
|
-
disabledContainerColor?: ColorValue;
|
|
60
|
-
errorContainerColor?: ColorValue;
|
|
61
|
-
cursorColor?: ColorValue;
|
|
62
|
-
errorCursorColor?: ColorValue;
|
|
63
|
-
focusedIndicatorColor?: ColorValue;
|
|
64
|
-
unfocusedIndicatorColor?: ColorValue;
|
|
65
|
-
disabledIndicatorColor?: ColorValue;
|
|
66
|
-
errorIndicatorColor?: ColorValue;
|
|
67
|
-
focusedLeadingIconColor?: ColorValue;
|
|
68
|
-
unfocusedLeadingIconColor?: ColorValue;
|
|
69
|
-
disabledLeadingIconColor?: ColorValue;
|
|
70
|
-
errorLeadingIconColor?: ColorValue;
|
|
71
|
-
focusedTrailingIconColor?: ColorValue;
|
|
72
|
-
unfocusedTrailingIconColor?: ColorValue;
|
|
73
|
-
disabledTrailingIconColor?: ColorValue;
|
|
74
|
-
errorTrailingIconColor?: ColorValue;
|
|
75
|
-
focusedLabelColor?: ColorValue;
|
|
76
|
-
unfocusedLabelColor?: ColorValue;
|
|
77
|
-
disabledLabelColor?: ColorValue;
|
|
78
|
-
errorLabelColor?: ColorValue;
|
|
79
|
-
focusedPlaceholderColor?: ColorValue;
|
|
80
|
-
unfocusedPlaceholderColor?: ColorValue;
|
|
81
|
-
disabledPlaceholderColor?: ColorValue;
|
|
82
|
-
errorPlaceholderColor?: ColorValue;
|
|
83
|
-
focusedSupportingTextColor?: ColorValue;
|
|
84
|
-
unfocusedSupportingTextColor?: ColorValue;
|
|
85
|
-
disabledSupportingTextColor?: ColorValue;
|
|
86
|
-
errorSupportingTextColor?: ColorValue;
|
|
87
|
-
focusedPrefixColor?: ColorValue;
|
|
88
|
-
unfocusedPrefixColor?: ColorValue;
|
|
89
|
-
disabledPrefixColor?: ColorValue;
|
|
90
|
-
errorPrefixColor?: ColorValue;
|
|
91
|
-
focusedSuffixColor?: ColorValue;
|
|
92
|
-
unfocusedSuffixColor?: ColorValue;
|
|
93
|
-
disabledSuffixColor?: ColorValue;
|
|
94
|
-
errorSuffixColor?: ColorValue;
|
|
95
|
-
};
|
|
96
|
-
/** Shared props between `TextField` and `OutlinedTextField`. */
|
|
97
|
-
type BaseTextFieldProps = {
|
|
98
|
-
ref?: Ref<TextFieldRef>;
|
|
99
|
-
/**
|
|
100
|
-
* An observable state that holds the current text value. Create one with
|
|
101
|
-
* `useNativeState('initial text')`. If omitted, the field manages its own
|
|
102
|
-
* internal state.
|
|
103
|
-
*/
|
|
104
|
-
value?: ObservableState<string>;
|
|
105
|
-
/** If true, the text field will be focused automatically when mounted. @default false */
|
|
106
|
-
autoFocus?: boolean;
|
|
107
|
-
/** @default true */
|
|
108
|
-
enabled?: boolean;
|
|
109
|
-
/** @default false */
|
|
110
|
-
readOnly?: boolean;
|
|
111
|
-
/** @default false */
|
|
112
|
-
isError?: boolean;
|
|
113
|
-
/** @default false */
|
|
114
|
-
singleLine?: boolean;
|
|
115
|
-
maxLines?: number;
|
|
116
|
-
minLines?: number;
|
|
117
|
-
/**
|
|
118
|
-
* Display-time text transformation. `'password'` masks every character;
|
|
119
|
-
* `'none'` (default) leaves the buffer as-is.
|
|
120
|
-
*/
|
|
121
|
-
visualTransformation?: 'password' | 'none';
|
|
122
|
-
/**
|
|
123
|
-
* Selection-related colors. Maps to Compose's `TextSelectionColors` via
|
|
124
|
-
* `LocalTextSelectionColors`. `handleColor` controls the drag handles;
|
|
125
|
-
* `backgroundColor` is the highlighted-text background (typically the same
|
|
126
|
-
* tint at lower alpha so the underlying text stays readable).
|
|
127
|
-
*/
|
|
128
|
-
textSelectionColors?: {
|
|
129
|
-
handleColor?: ColorValue;
|
|
130
|
-
backgroundColor?: ColorValue;
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* Observable state holding the current selection range. Create with
|
|
134
|
-
* `useNativeState({ start: 0, end: 0 })`. The field writes user-driven
|
|
135
|
-
* changes back to it, and writes from JS (or a worklet) update the
|
|
136
|
-
* cursor/selection in the field. Use `ref.setSelection(start, end)` for
|
|
137
|
-
* imperative one-shot updates.
|
|
138
|
-
*/
|
|
139
|
-
selection?: ObservableState<{
|
|
140
|
-
start: number;
|
|
141
|
-
end: number;
|
|
142
|
-
}>;
|
|
143
|
-
/** Maximum number of characters allowed. Truncates natively as the user types. */
|
|
144
|
-
maxLength?: number;
|
|
145
|
-
/** Called when the selection range changes. */
|
|
146
|
-
onSelectionChange?: (selection: {
|
|
147
|
-
start: number;
|
|
148
|
-
end: number;
|
|
149
|
-
}) => void;
|
|
150
|
-
/**
|
|
151
|
-
* Text styling for the field's content. Maps to Compose's `TextStyle`.
|
|
152
|
-
*/
|
|
153
|
-
textStyle?: {
|
|
154
|
-
textAlign?: 'left' | 'right' | 'center' | 'justify';
|
|
155
|
-
color?: ColorValue;
|
|
156
|
-
fontSize?: number;
|
|
157
|
-
fontFamily?: string;
|
|
158
|
-
fontWeight?: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | 'normal' | 'bold';
|
|
159
|
-
lineHeight?: number;
|
|
160
|
-
letterSpacing?: number;
|
|
161
|
-
};
|
|
162
|
-
keyboardOptions?: TextFieldKeyboardOptions;
|
|
163
|
-
keyboardActions?: TextFieldKeyboardActions;
|
|
164
|
-
/**
|
|
165
|
-
* Fires whenever the text value changes. If marked with the `'worklet'`
|
|
166
|
-
* directive, runs synchronously on the UI thread; otherwise delivered
|
|
167
|
-
* asynchronously as a regular JS event. Use `onSelectionChange` (or read
|
|
168
|
-
* the `selection` observable) to react to selection-only changes.
|
|
169
|
-
*/
|
|
170
|
-
onValueChange?: (value: string) => void;
|
|
171
|
-
/** A callback triggered when the field gains or loses focus. */
|
|
172
|
-
onFocusChanged?: (focused: boolean) => void;
|
|
173
|
-
/**
|
|
174
|
-
* Shape used for the field's container outline/fill. Use the helpers from
|
|
175
|
-
* `Shape` (for example, `<Shape.Pill />` or `<Shape.RoundedCorner cornerRadii={...} />`).
|
|
176
|
-
* Defaults to the Material `OutlinedTextFieldDefaults.shape`/`TextFieldDefaults.shape`.
|
|
177
|
-
*/
|
|
178
|
-
shape?: ShapeJSXElement;
|
|
179
|
-
modifiers?: ModifierConfig[];
|
|
180
|
-
/** Slot children (e.g. `TextField.Label`, `TextField.Placeholder`). */
|
|
181
|
-
children?: React.ReactNode;
|
|
182
|
-
};
|
|
183
|
-
export type TextFieldProps = BaseTextFieldProps & {
|
|
184
|
-
colors?: TextFieldColors;
|
|
185
|
-
};
|
|
186
|
-
export type OutlinedTextFieldProps = BaseTextFieldProps & {
|
|
187
|
-
colors?: TextFieldColors;
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* A Material3 `TextField`.
|
|
191
|
-
*/
|
|
192
|
-
declare function TextFieldComponent(props: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
193
|
-
declare namespace TextFieldComponent {
|
|
194
|
-
var Label: (props: {
|
|
195
|
-
children: React.ReactNode;
|
|
196
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
197
|
-
var Placeholder: (props: {
|
|
198
|
-
children: React.ReactNode;
|
|
199
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
200
|
-
var LeadingIcon: (props: {
|
|
201
|
-
children: React.ReactNode;
|
|
202
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
203
|
-
var TrailingIcon: (props: {
|
|
204
|
-
children: React.ReactNode;
|
|
205
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
206
|
-
var Prefix: (props: {
|
|
207
|
-
children: React.ReactNode;
|
|
208
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
209
|
-
var Suffix: (props: {
|
|
210
|
-
children: React.ReactNode;
|
|
211
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
212
|
-
var SupportingText: (props: {
|
|
213
|
-
children: React.ReactNode;
|
|
214
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* A Material3 `OutlinedTextField` with a transparent background and border outline.
|
|
218
|
-
*/
|
|
219
|
-
declare function OutlinedTextFieldComponent(props: OutlinedTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
220
|
-
declare namespace OutlinedTextFieldComponent {
|
|
221
|
-
var Label: (props: {
|
|
222
|
-
children: React.ReactNode;
|
|
223
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
224
|
-
var Placeholder: (props: {
|
|
225
|
-
children: React.ReactNode;
|
|
226
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
227
|
-
var LeadingIcon: (props: {
|
|
228
|
-
children: React.ReactNode;
|
|
229
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
230
|
-
var TrailingIcon: (props: {
|
|
231
|
-
children: React.ReactNode;
|
|
232
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
233
|
-
var Prefix: (props: {
|
|
234
|
-
children: React.ReactNode;
|
|
235
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
236
|
-
var Suffix: (props: {
|
|
237
|
-
children: React.ReactNode;
|
|
238
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
239
|
-
var SupportingText: (props: {
|
|
240
|
-
children: React.ReactNode;
|
|
241
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
242
|
-
}
|
|
243
|
-
export { TextFieldComponent as TextField, OutlinedTextFieldComponent as OutlinedTextField };
|
|
244
|
-
export { type ObservableState };
|
|
1
|
+
export { TextField, OutlinedTextField, type TextFieldColors, type TextFieldProps, type OutlinedTextFieldProps, type ObservableState, } from './TextField';
|
|
2
|
+
export { BasicTextField, type BasicTextFieldProps, type BasicTextFieldRef } from './BasicTextField';
|
|
3
|
+
export type { TextFieldRef, TextFieldCapitalization, TextFieldImeAction, TextFieldKeyboardType, TextFieldKeyboardOptions, TextFieldKeyboardActions, TextFieldTextStyle, CommonTextFieldProperties, } from './shared';
|
|
245
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/TextField/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/TextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACpG,YAAY,EACV,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,UAAU,CAAC"}
|