@expo/ui 56.0.15 → 56.0.17
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 +47 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +54 -6
- package/android/src/main/java/expo/modules/ui/HostView.kt +0 -2
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +65 -0
- package/android/src/main/java/expo/modules/ui/NavigationBarView.kt +95 -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} +63 -267
- 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/pager-view/PagerView.android.d.ts.map +1 -1
- package/build/jetpack-compose/NavigationBar/index.d.ts +101 -0
- package/build/jetpack-compose/NavigationBar/index.d.ts.map +1 -0
- 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 +2 -1
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/index.d.ts +42 -0
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/DisclosureGroup/index.d.ts +11 -2
- package/build/swift-ui/DisclosureGroup/index.d.ts.map +1 -1
- package/build/swift-ui/Image/index.d.ts +7 -1
- package/build/swift-ui/Image/index.d.ts.map +1 -1
- package/build/swift-ui/Label/index.d.ts +5 -0
- package/build/swift-ui/Label/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +100 -4
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/universal/Collapsible/index.android.d.ts +1 -1
- package/build/universal/Collapsible/index.android.d.ts.map +1 -1
- package/build/universal/Collapsible/index.d.ts +1 -1
- package/build/universal/Collapsible/index.d.ts.map +1 -1
- package/build/universal/Collapsible/index.ios.d.ts +1 -1
- package/build/universal/Collapsible/index.ios.d.ts.map +1 -1
- package/build/universal/Collapsible/types.d.ts +5 -0
- package/build/universal/Collapsible/types.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/expo-module.config.json +1 -1
- package/ios/BottomSheetView.swift +1 -1
- package/ios/DisclosureGroupView.swift +36 -13
- package/ios/ImageView.swift +20 -14
- package/ios/Label.swift +26 -2
- package/ios/Modifiers/ButtonBorderShapeModifier.swift +46 -0
- package/ios/Modifiers/DynamicTypeSizeModifier.swift +56 -0
- package/ios/Modifiers/FontModifier.swift +4 -1
- package/ios/Modifiers/ImageScaleModifier.swift +29 -0
- package/ios/Modifiers/OnGeometryChangeModifier.swift +8 -16
- package/ios/Modifiers/ViewModifierRegistry.swift +89 -8
- package/ios/SecureFieldView.swift +17 -1
- package/ios/TextFieldView.swift +33 -2
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.15/expo.modules.ui-56.0.15-sources.jar → 56.0.17/expo.modules.ui-56.0.17-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.15/expo.modules.ui-56.0.15.module → 56.0.17/expo.modules.ui-56.0.17.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.15/expo.modules.ui-56.0.15.pom → 56.0.17/expo.modules.ui-56.0.17.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.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 +4 -4
- package/src/State/index.fx.ts +4 -1
- package/src/State/useNativeState.ts +24 -13
- 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 +16 -2
- package/src/community/pager-view/PagerView.ios.tsx +1 -1
- package/src/community/picker/Picker.ios.tsx +1 -1
- package/src/community/segmented-control/SegmentedControl.ios.tsx +1 -1
- package/src/community/slider/Slider.ios.tsx +1 -1
- package/src/jetpack-compose/NavigationBar/index.tsx +174 -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 +7 -0
- package/src/jetpack-compose/modifiers/index.ts +49 -0
- package/src/swift-ui/BottomSheet/index.tsx +1 -1
- package/src/swift-ui/DisclosureGroup/index.tsx +14 -2
- package/src/swift-ui/Image/index.tsx +16 -3
- package/src/swift-ui/Label/index.tsx +8 -1
- package/src/swift-ui/modifiers/index.ts +143 -5
- package/src/universal/Collapsible/index.android.tsx +10 -2
- package/src/universal/Collapsible/index.ios.tsx +17 -3
- package/src/universal/Collapsible/index.tsx +8 -2
- package/src/universal/Collapsible/types.ts +7 -0
- package/src/universal/TextInput/index.android.tsx +26 -33
- package/src/universal/TextInput/types.ts +5 -1
- package/android/src/main/java/expo/modules/ui/ShadowNodeSyncFlush.kt +0 -28
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.sha512 +0 -1
|
@@ -190,13 +190,17 @@ export const onDisappear = (handler: () => void) =>
|
|
|
190
190
|
createModifierWithEventListener('onDisappear', handler);
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
* Calls the handler whenever the view's geometry changes
|
|
194
|
-
*
|
|
193
|
+
* Calls the handler whenever the view's geometry changes, with its position and size.
|
|
194
|
+
* `x` and `y` are in the global coordinate space (relative to the window); all values are in points.
|
|
195
|
+
* @param handler - Function called with the new frame.
|
|
195
196
|
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/ongeometrychange(for:of:action:)).
|
|
196
197
|
*/
|
|
197
|
-
export const onGeometryChange = (
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
export const onGeometryChange = (
|
|
199
|
+
handler: (frame: { x: number; y: number; width: number; height: number }) => void
|
|
200
|
+
) =>
|
|
201
|
+
createModifierWithEventListener(
|
|
202
|
+
'onGeometryChange',
|
|
203
|
+
(frame: { x: number; y: number; width: number; height: number }) => handler(frame)
|
|
200
204
|
);
|
|
201
205
|
|
|
202
206
|
/**
|
|
@@ -534,6 +538,17 @@ export const buttonStyle = (
|
|
|
534
538
|
| 'plain'
|
|
535
539
|
) => createModifier('buttonStyle', { style });
|
|
536
540
|
|
|
541
|
+
/**
|
|
542
|
+
* Sets the border shape used by buttons within this view.
|
|
543
|
+
* @param shape - The button border shape.
|
|
544
|
+
* @param cornerRadius - Corner radius, only used with `'roundedRectangle'`.
|
|
545
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/buttonbordershape(_:)).
|
|
546
|
+
*/
|
|
547
|
+
export const buttonBorderShape = (
|
|
548
|
+
shape: 'automatic' | 'capsule' | 'roundedRectangle' | 'circle',
|
|
549
|
+
cornerRadius?: number
|
|
550
|
+
) => createModifier('buttonBorderShape', { shape, cornerRadius });
|
|
551
|
+
|
|
537
552
|
/**
|
|
538
553
|
* Sets the style for toggles within this view.
|
|
539
554
|
* @param style - The toggle style.
|
|
@@ -550,6 +565,14 @@ export const toggleStyle = (style: 'automatic' | 'switch' | 'button') =>
|
|
|
550
565
|
export const controlSize = (size: 'mini' | 'small' | 'regular' | 'large' | 'extraLarge') =>
|
|
551
566
|
createModifier('controlSize', { size });
|
|
552
567
|
|
|
568
|
+
/**
|
|
569
|
+
* Scales SF Symbols within this view relative to the surrounding text, using one of the standard sizes.
|
|
570
|
+
* @param scale - The relative image scale.
|
|
571
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/imagescale(_:)).
|
|
572
|
+
*/
|
|
573
|
+
export const imageScale = (scale: 'small' | 'medium' | 'large') =>
|
|
574
|
+
createModifier('imageScale', { scale });
|
|
575
|
+
|
|
553
576
|
/**
|
|
554
577
|
* Sets the style for labels within this view.
|
|
555
578
|
* @param style - The label style.
|
|
@@ -720,6 +743,39 @@ export const accessibilityHint = (hint: string) => createModifier('accessibility
|
|
|
720
743
|
export const accessibilityValue = (value: string) =>
|
|
721
744
|
createModifier('accessibilityValue', { value });
|
|
722
745
|
|
|
746
|
+
/**
|
|
747
|
+
* Sets alternative spoken phrases that Voice Control uses to refer to the view.
|
|
748
|
+
* Each label is read as a `Text` element on iOS. For example, an "End" button
|
|
749
|
+
* might offer "Hang up" so users can trigger it by saying that phrase.
|
|
750
|
+
* @param inputLabels - The spoken phrases that select the view.
|
|
751
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/accessibilityinputlabels(_:)).
|
|
752
|
+
*/
|
|
753
|
+
export const accessibilityInputLabels = (inputLabels: string[]) =>
|
|
754
|
+
createModifier('accessibilityInputLabels', { inputLabels });
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Sets an accessibility identifier for the view.
|
|
758
|
+
*
|
|
759
|
+
* Unlike `accessibilityLabel`, this value is for UI testing and is not visible
|
|
760
|
+
* to the user. UI testing tools such as XCUITest read it to locate the view, so
|
|
761
|
+
* prefer a stable, machine-readable identifier here.
|
|
762
|
+
* @param identifier - The accessibility identifier used for UI testing.
|
|
763
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/accessibilityidentifier(_:)).
|
|
764
|
+
*/
|
|
765
|
+
export const accessibilityIdentifier = (identifier: string) =>
|
|
766
|
+
createModifier('accessibilityIdentifier', { identifier });
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* Marks the view as decoratively-named so VoiceOver and other assistive
|
|
770
|
+
* technologies skip it during element traversal. Useful for hero icons or
|
|
771
|
+
* presentational imagery that's already described by adjacent text.
|
|
772
|
+
*
|
|
773
|
+
* @param hidden - Whether the view should be hidden from accessibility. Defaults to `true`.
|
|
774
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/accessibilityhidden(_:)).
|
|
775
|
+
*/
|
|
776
|
+
export const accessibilityHidden = (hidden: boolean = true) =>
|
|
777
|
+
createModifier('accessibilityHidden', { hidden });
|
|
778
|
+
|
|
723
779
|
/**
|
|
724
780
|
* Sets layout priority for the view.
|
|
725
781
|
* @param priority - Layout priority value.
|
|
@@ -837,6 +893,14 @@ export const listRowSeparator = (
|
|
|
837
893
|
edges?: 'all' | 'top' | 'bottom'
|
|
838
894
|
) => createModifier('listRowSeparator', { visibility, edges });
|
|
839
895
|
|
|
896
|
+
/**
|
|
897
|
+
* Sets the vertical spacing between adjacent rows in a list.
|
|
898
|
+
* @param spacing - The spacing value to use. When omitted, the default spacing is used.
|
|
899
|
+
* @platform ios 15.0+
|
|
900
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/listrowspacing(_:)).
|
|
901
|
+
*/
|
|
902
|
+
export const listRowSpacing = (spacing?: number) => createModifier('listRowSpacing', { spacing });
|
|
903
|
+
|
|
840
904
|
/**
|
|
841
905
|
* Sets the truncation mode for lines of text that are too long to fit in the available space.
|
|
842
906
|
* @param mode - The truncation mode that specifies where to truncate the text within the text view, if needed.
|
|
@@ -851,6 +915,19 @@ export const truncationMode = (mode: 'head' | 'middle' | 'tail') =>
|
|
|
851
915
|
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/allowstightening(_:)).
|
|
852
916
|
*/
|
|
853
917
|
export const allowsTightening = (value: boolean) => createModifier('allowsTightening', { value });
|
|
918
|
+
/**
|
|
919
|
+
* Sets the minimum amount that text in this view scales down to fit in the available space.
|
|
920
|
+
*
|
|
921
|
+
* Use this modifier if the text you place in a view doesn't fit and it's okay if the text shrinks
|
|
922
|
+
* to accommodate. For example, a label with a minimum scale factor of `0.5` draws its text in a
|
|
923
|
+
* font size as small as half of the actual font if needed.
|
|
924
|
+
* @param factor - A fraction between `0` and `1` (including `0` and `1`) that specifies the amount
|
|
925
|
+
* of text to draw. For example, a value of `0.5` draws the text in a font size as small as half the
|
|
926
|
+
* actual font if needed.
|
|
927
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/minimumscalefactor(_:)).
|
|
928
|
+
*/
|
|
929
|
+
export const minimumScaleFactor = (factor: number) =>
|
|
930
|
+
createModifier('minimumScaleFactor', { factor });
|
|
854
931
|
/**
|
|
855
932
|
* Sets the spacing, or kerning, between characters for the text in this view.
|
|
856
933
|
* @default 0
|
|
@@ -1038,6 +1115,60 @@ export const font = (params: {
|
|
|
1038
1115
|
| 'caption'
|
|
1039
1116
|
| 'caption2';
|
|
1040
1117
|
}) => createModifier('font', params);
|
|
1118
|
+
/**
|
|
1119
|
+
* A standard size for Dynamic Type, from `xSmall` through the five
|
|
1120
|
+
* `accessibility` sizes. Mirrors SwiftUI's `DynamicTypeSize`.
|
|
1121
|
+
*/
|
|
1122
|
+
export type DynamicTypeSizeValue =
|
|
1123
|
+
| 'xSmall'
|
|
1124
|
+
| 'small'
|
|
1125
|
+
| 'medium'
|
|
1126
|
+
| 'large'
|
|
1127
|
+
| 'xLarge'
|
|
1128
|
+
| 'xxLarge'
|
|
1129
|
+
| 'xxxLarge'
|
|
1130
|
+
| 'accessibility1'
|
|
1131
|
+
| 'accessibility2'
|
|
1132
|
+
| 'accessibility3'
|
|
1133
|
+
| 'accessibility4'
|
|
1134
|
+
| 'accessibility5';
|
|
1135
|
+
/**
|
|
1136
|
+
* Sets or constrains the Dynamic Type size within the view, overriding the
|
|
1137
|
+
* value inherited from the system.
|
|
1138
|
+
*
|
|
1139
|
+
* Four variants matching SwiftUI's `dynamicTypeSize(_:)`:
|
|
1140
|
+
* - `dynamicTypeSize('large')` — fixes the Dynamic Type size to a single value
|
|
1141
|
+
* - `dynamicTypeSize({ max: 'accessibility3' })` — caps growth at a ceiling (`...accessibility3`)
|
|
1142
|
+
* - `dynamicTypeSize({ min: 'large' })` — sets a floor (`large...`)
|
|
1143
|
+
* - `dynamicTypeSize({ min: 'large', max: 'accessibility3' })` — clamps to a range (`large...accessibility3`)
|
|
1144
|
+
*
|
|
1145
|
+
* `min` and `max` are independent: pass either or both. Set it on a `<Host>` to
|
|
1146
|
+
* cascade the constraint to every descendant through the SwiftUI environment.
|
|
1147
|
+
* Keep `min` at or below `max`, or the range traps natively, like SwiftUI.
|
|
1148
|
+
* Per Apple's guidance, prefer capping at an accessibility size over disabling
|
|
1149
|
+
* Dynamic Type entirely.
|
|
1150
|
+
*
|
|
1151
|
+
* @example
|
|
1152
|
+
* ```tsx
|
|
1153
|
+
* // Cap how large text in a tight layout can grow
|
|
1154
|
+
* <Host modifiers={[dynamicTypeSize({ max: 'accessibility3' })]}>...</Host>
|
|
1155
|
+
* ```
|
|
1156
|
+
*
|
|
1157
|
+
* @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/dynamictypesize(_:)).
|
|
1158
|
+
*/
|
|
1159
|
+
export function dynamicTypeSize(size: DynamicTypeSizeValue): ModifierConfig;
|
|
1160
|
+
export function dynamicTypeSize(range: {
|
|
1161
|
+
min?: DynamicTypeSizeValue;
|
|
1162
|
+
max?: DynamicTypeSizeValue;
|
|
1163
|
+
}): ModifierConfig;
|
|
1164
|
+
export function dynamicTypeSize(
|
|
1165
|
+
sizeOrRange: DynamicTypeSizeValue | { min?: DynamicTypeSizeValue; max?: DynamicTypeSizeValue }
|
|
1166
|
+
): ModifierConfig {
|
|
1167
|
+
if (typeof sizeOrRange === 'object' && sizeOrRange !== null) {
|
|
1168
|
+
return createModifier('dynamicTypeSize', { min: sizeOrRange.min, max: sizeOrRange.max });
|
|
1169
|
+
}
|
|
1170
|
+
return createModifier('dynamicTypeSize', { size: sizeOrRange });
|
|
1171
|
+
}
|
|
1041
1172
|
/**
|
|
1042
1173
|
* Asks grid layouts not to offer the view extra size in the specified axes.
|
|
1043
1174
|
* @param axes - The dimensions in which the grid shouldn’t offer the view a share of any available space. This prevents a flexible view like a Spacer, Divider, or Color from defining the size of a row or column.
|
|
@@ -1329,8 +1460,10 @@ export type BuiltInModifier =
|
|
|
1329
1460
|
| ReturnType<typeof colorInvert>
|
|
1330
1461
|
| ReturnType<typeof grayscale>
|
|
1331
1462
|
| ReturnType<typeof buttonStyle>
|
|
1463
|
+
| ReturnType<typeof buttonBorderShape>
|
|
1332
1464
|
| ReturnType<typeof toggleStyle>
|
|
1333
1465
|
| ReturnType<typeof controlSize>
|
|
1466
|
+
| ReturnType<typeof imageScale>
|
|
1334
1467
|
| ReturnType<typeof labelStyle>
|
|
1335
1468
|
| ReturnType<typeof labelsHidden>
|
|
1336
1469
|
| ReturnType<typeof textFieldStyle>
|
|
@@ -1338,6 +1471,9 @@ export type BuiltInModifier =
|
|
|
1338
1471
|
| ReturnType<typeof accessibilityLabel>
|
|
1339
1472
|
| ReturnType<typeof accessibilityHint>
|
|
1340
1473
|
| ReturnType<typeof accessibilityValue>
|
|
1474
|
+
| ReturnType<typeof accessibilityInputLabels>
|
|
1475
|
+
| ReturnType<typeof accessibilityIdentifier>
|
|
1476
|
+
| ReturnType<typeof accessibilityHidden>
|
|
1341
1477
|
| ReturnType<typeof layoutPriority>
|
|
1342
1478
|
| ReturnType<typeof mask>
|
|
1343
1479
|
| ReturnType<typeof overlay>
|
|
@@ -1366,6 +1502,7 @@ export type BuiltInModifier =
|
|
|
1366
1502
|
| ReturnType<typeof environment>
|
|
1367
1503
|
| ReturnType<typeof listRowBackground>
|
|
1368
1504
|
| ReturnType<typeof listRowSeparator>
|
|
1505
|
+
| ReturnType<typeof listRowSpacing>
|
|
1369
1506
|
| ReturnType<typeof truncationMode>
|
|
1370
1507
|
| ReturnType<typeof allowsTightening>
|
|
1371
1508
|
| ReturnType<typeof kerning>
|
|
@@ -1383,6 +1520,7 @@ export type BuiltInModifier =
|
|
|
1383
1520
|
| ReturnType<typeof badge>
|
|
1384
1521
|
| ReturnType<typeof listSectionMargins>
|
|
1385
1522
|
| ReturnType<typeof font>
|
|
1523
|
+
| ReturnType<typeof dynamicTypeSize>
|
|
1386
1524
|
| ReturnType<typeof gridCellUnsizedAxes>
|
|
1387
1525
|
| ReturnType<typeof gridCellColumns>
|
|
1388
1526
|
| ReturnType<typeof gridColumnAlignment>
|
|
@@ -35,7 +35,13 @@ const EXIT = ExitTransition.shrinkVertically().plus(ExitTransition.fadeOut());
|
|
|
35
35
|
* Android implementation of `Collapsible`.
|
|
36
36
|
* A rounded M3 card whose container tint fades between `transparent` (collapsed) and `surfaceContainer` (expanded).
|
|
37
37
|
*/
|
|
38
|
-
export function Collapsible({
|
|
38
|
+
export function Collapsible({
|
|
39
|
+
isOpen,
|
|
40
|
+
onOpenChange,
|
|
41
|
+
label = '',
|
|
42
|
+
labelStyle,
|
|
43
|
+
children,
|
|
44
|
+
}: CollapsibleProps) {
|
|
39
45
|
const colors = useMaterialColors();
|
|
40
46
|
const containerColor = isOpen ? colors.surfaceContainer : 'transparent';
|
|
41
47
|
|
|
@@ -51,7 +57,9 @@ export function Collapsible({ isOpen, onOpenChange, label = '', children }: Coll
|
|
|
51
57
|
colors={{ containerColor: 'transparent' }}
|
|
52
58
|
modifiers={[clickable(() => onOpenChange(!isOpen))]}>
|
|
53
59
|
<ListItem.HeadlineContent>
|
|
54
|
-
<Text
|
|
60
|
+
<Text color={labelStyle?.color} style={labelStyle}>
|
|
61
|
+
{label}
|
|
62
|
+
</Text>
|
|
55
63
|
</ListItem.HeadlineContent>
|
|
56
64
|
<ListItem.TrailingContent>
|
|
57
65
|
<Icon
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
import { DisclosureGroup } from '@expo/ui/swift-ui';
|
|
1
|
+
import { DisclosureGroup, Text } from '@expo/ui/swift-ui';
|
|
2
2
|
|
|
3
|
+
import { transformToModifiers } from '../transformStyle';
|
|
3
4
|
import type { CollapsibleProps } from './types';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* iOS implementation of `Collapsible`. Wraps SwiftUI's `DisclosureGroup`.
|
|
7
8
|
*/
|
|
8
|
-
export function Collapsible({
|
|
9
|
+
export function Collapsible({
|
|
10
|
+
isOpen,
|
|
11
|
+
onOpenChange,
|
|
12
|
+
label = '',
|
|
13
|
+
labelStyle,
|
|
14
|
+
children,
|
|
15
|
+
}: CollapsibleProps) {
|
|
16
|
+
const labelTextModifiers = labelStyle
|
|
17
|
+
? transformToModifiers(undefined, {}, undefined, { textStyle: labelStyle })
|
|
18
|
+
: undefined;
|
|
19
|
+
|
|
9
20
|
return (
|
|
10
|
-
<DisclosureGroup
|
|
21
|
+
<DisclosureGroup isExpanded={isOpen} onIsExpandedChange={onOpenChange}>
|
|
22
|
+
<DisclosureGroup.Label>
|
|
23
|
+
<Text modifiers={labelTextModifiers}>{label}</Text>
|
|
24
|
+
</DisclosureGroup.Label>
|
|
11
25
|
{children}
|
|
12
26
|
</DisclosureGroup>
|
|
13
27
|
);
|
|
@@ -23,7 +23,13 @@ const Summary = (
|
|
|
23
23
|
* A primitive that toggles visibility of its content via a labelled tappable
|
|
24
24
|
* header. Controlled via `isOpen` + `onOpenChange`.
|
|
25
25
|
*/
|
|
26
|
-
export function Collapsible({
|
|
26
|
+
export function Collapsible({
|
|
27
|
+
isOpen,
|
|
28
|
+
onOpenChange,
|
|
29
|
+
label = '',
|
|
30
|
+
labelStyle,
|
|
31
|
+
children,
|
|
32
|
+
}: CollapsibleProps) {
|
|
27
33
|
const isDark = useColorScheme() === 'dark';
|
|
28
34
|
|
|
29
35
|
return (
|
|
@@ -37,7 +43,7 @@ export function Collapsible({ isOpen, onOpenChange, label = '', children }: Coll
|
|
|
37
43
|
}}
|
|
38
44
|
style={[styles.container, isDark && styles.darkText]}>
|
|
39
45
|
<Summary style={styles.summary}>
|
|
40
|
-
<Text style={isDark && styles.darkText}>{label}</Text>
|
|
46
|
+
<Text style={[isDark && styles.darkText, labelStyle]}>{label}</Text>
|
|
41
47
|
</Summary>
|
|
42
48
|
<View style={styles.content}>{children}</View>
|
|
43
49
|
</Details>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { UniversalTextStyle } from '../Text/types';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Props for the [`Collapsible`](#collapsible) component, a primitive that
|
|
3
5
|
* shows or hides its content with a tap on a labelled header.
|
|
@@ -18,6 +20,11 @@ export interface CollapsibleProps {
|
|
|
18
20
|
*/
|
|
19
21
|
label?: string;
|
|
20
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Text-specific styling for the tappable header label.
|
|
25
|
+
*/
|
|
26
|
+
labelStyle?: UniversalTextStyle;
|
|
27
|
+
|
|
21
28
|
/**
|
|
22
29
|
* Content rendered when `isOpen` is `true`.
|
|
23
30
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
BasicTextField,
|
|
3
|
+
Box,
|
|
3
4
|
Text,
|
|
4
5
|
type TextFieldImeAction,
|
|
5
6
|
type TextFieldKeyboardType,
|
|
@@ -7,6 +8,7 @@ import {
|
|
|
7
8
|
useNativeState,
|
|
8
9
|
} from '@expo/ui/jetpack-compose';
|
|
9
10
|
import {
|
|
11
|
+
fillMaxWidth,
|
|
10
12
|
onSizeChanged,
|
|
11
13
|
semantics,
|
|
12
14
|
testID as testIDModifier,
|
|
@@ -153,7 +155,7 @@ export function TextInput({
|
|
|
153
155
|
: undefined;
|
|
154
156
|
|
|
155
157
|
return (
|
|
156
|
-
<
|
|
158
|
+
<BasicTextField
|
|
157
159
|
ref={innerRef}
|
|
158
160
|
modifiers={[
|
|
159
161
|
...(userModifiers ?? []),
|
|
@@ -168,30 +170,7 @@ export function TextInput({
|
|
|
168
170
|
singleLine={!multiline}
|
|
169
171
|
maxLines={multiline && numberOfLines && numberOfLines > 0 ? numberOfLines : undefined}
|
|
170
172
|
minLines={multiline && numberOfLines && numberOfLines > 0 ? numberOfLines : undefined}
|
|
171
|
-
|
|
172
|
-
caretHidden || cursorColor || underlineColorAndroid || placeholderTextColor
|
|
173
|
-
? {
|
|
174
|
-
...(caretHidden
|
|
175
|
-
? { cursorColor: 'transparent' }
|
|
176
|
-
: cursorColor
|
|
177
|
-
? { cursorColor }
|
|
178
|
-
: null),
|
|
179
|
-
...(underlineColorAndroid
|
|
180
|
-
? {
|
|
181
|
-
unfocusedIndicatorColor: underlineColorAndroid,
|
|
182
|
-
focusedIndicatorColor: underlineColorAndroid,
|
|
183
|
-
}
|
|
184
|
-
: null),
|
|
185
|
-
...(placeholderTextColor
|
|
186
|
-
? {
|
|
187
|
-
unfocusedPlaceholderColor: placeholderTextColor,
|
|
188
|
-
focusedPlaceholderColor: placeholderTextColor,
|
|
189
|
-
disabledPlaceholderColor: placeholderTextColor,
|
|
190
|
-
}
|
|
191
|
-
: null),
|
|
192
|
-
}
|
|
193
|
-
: undefined
|
|
194
|
-
}
|
|
173
|
+
cursorColor={caretHidden ? 'transparent' : (cursorColor ?? selectionColor)}
|
|
195
174
|
textStyle={
|
|
196
175
|
textStyle || (textAlign && textAlign !== 'auto')
|
|
197
176
|
? {
|
|
@@ -214,14 +193,28 @@ export function TextInput({
|
|
|
214
193
|
onValueChange={onChangeText}
|
|
215
194
|
maxLength={maxLength}
|
|
216
195
|
onFocusChanged={handleFocusChanged}
|
|
217
|
-
selection={selection as Parameters<typeof
|
|
196
|
+
selection={selection as Parameters<typeof BasicTextField>[0]['selection']}
|
|
218
197
|
onSelectionChange={onSelectionChange}>
|
|
219
|
-
|
|
220
|
-
<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
198
|
+
<BasicTextField.DecorationBox>
|
|
199
|
+
<Box
|
|
200
|
+
modifiers={[fillMaxWidth()]}
|
|
201
|
+
contentAlignment={
|
|
202
|
+
textAlign === 'center' ? 'topCenter' : textAlign === 'right' ? 'topEnd' : undefined
|
|
203
|
+
}>
|
|
204
|
+
{placeholder != null ? (
|
|
205
|
+
<BasicTextField.Placeholder>
|
|
206
|
+
<Text
|
|
207
|
+
color={placeholderTextColor as string | undefined}
|
|
208
|
+
modifiers={[fillMaxWidth()]}
|
|
209
|
+
style={textAlign && textAlign !== 'auto' ? { textAlign } : undefined}>
|
|
210
|
+
{placeholder}
|
|
211
|
+
</Text>
|
|
212
|
+
</BasicTextField.Placeholder>
|
|
213
|
+
) : null}
|
|
214
|
+
<BasicTextField.InnerTextField />
|
|
215
|
+
</Box>
|
|
216
|
+
</BasicTextField.DecorationBox>
|
|
217
|
+
</BasicTextField>
|
|
225
218
|
);
|
|
226
219
|
}
|
|
227
220
|
|
|
@@ -194,7 +194,11 @@ export interface TextInputProps {
|
|
|
194
194
|
rows?: number;
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
|
-
* Color of the underline indicator on Android.
|
|
197
|
+
* Color of the underline indicator on Android.
|
|
198
|
+
*
|
|
199
|
+
* @deprecated The Android `TextInput` renders an unstyled `BasicTextField` that
|
|
200
|
+
* has no underline indicator, so this has no effect. To draw your own border,
|
|
201
|
+
* pass it through `style` or `modifiers`.
|
|
198
202
|
* @platform android
|
|
199
203
|
*/
|
|
200
204
|
underlineColorAndroid?: ColorValue;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
package expo.modules.ui
|
|
2
|
-
|
|
3
|
-
import android.view.View
|
|
4
|
-
import com.facebook.react.bridge.Arguments
|
|
5
|
-
import com.facebook.react.bridge.ReactContext
|
|
6
|
-
import com.facebook.react.bridge.WritableMap
|
|
7
|
-
import com.facebook.react.uimanager.UIManagerHelper
|
|
8
|
-
import com.facebook.react.uimanager.events.Event
|
|
9
|
-
|
|
10
|
-
// Workaround helper that triggers a synchronous event to flush a pending
|
|
11
|
-
// shadow-node state update in the current event beat. Mirrors iOS's
|
|
12
|
-
// `EventQueue::UpdateMode::unstable_Immediate`, which Android does not expose
|
|
13
|
-
// to Java/Kotlin as of now.
|
|
14
|
-
// TODO: Remove when a synchronous state update API is exposed on Android.
|
|
15
|
-
// https://github.com/facebook/react-native/pull/56311
|
|
16
|
-
internal fun View.flushPendingStateUpdates() {
|
|
17
|
-
val reactContext = context as? ReactContext ?: return
|
|
18
|
-
val surfaceId = UIManagerHelper.getSurfaceId(this)
|
|
19
|
-
UIManagerHelper.getEventDispatcherForReactTag(reactContext, id)
|
|
20
|
-
?.dispatchEvent(SyncFlushEvent(surfaceId, id))
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
private class SyncFlushEvent(surfaceId: Int, viewTag: Int) : Event<SyncFlushEvent>(surfaceId, viewTag) {
|
|
24
|
-
override fun getEventName(): String = "topExpoUISyncFlush"
|
|
25
|
-
override fun getEventData(): WritableMap = Arguments.createMap()
|
|
26
|
-
override fun canCoalesce(): Boolean = true
|
|
27
|
-
override fun experimental_isSynchronous(): Boolean = true
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2cf329d52090d6202b7a70c1cb7c2a4b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cef9c4c1296a5c70d6a61965cba485c2dd802f47
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
01e5734d4e704ab1ff81ad1651eae63e0c5317dbba712328b1721270d303e0cf
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ba1daa456b3e0d92466af0c58b5ddd0bdd0a4c5f06c727bf7d34acd69e78c42187295b575199cefa3b2098d59eeb1ab6fcf2463c339fd6af2a186224a14f505d
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar
DELETED
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
790df1c5a23dc1ac9a8521284af9bc15
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
7100e52679119435cf14936c7a715d729b763e16
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
27c02acb624ed6593fe2380e495a636970bc9033ae9cd00132029c7b8ecf899e
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b0183591c16d8ba78c2d0e6aad2044b660811a5fb2126302a5f746dff169fc93fd4547d4c73ccf35bfefa083fde9819acbf3bb0fa4f6c80869e0d225880047a2
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e6bb09e9c4356f9c9879e24e1b133cba
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
31baeb0a70741592621ef9b3fe973a23610a563b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c3b3041adb593ed9fc7963db11fd0a71170dc9778d48f0aac09908b9374500b9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f91dfa09f2f467b5332f41b2232a9956d8a542f41568d9fe895fca36be7643fcd7c3f8f03e6410dde0abea53ad161499b23a208a5b5277d735b02bc60f4edfdb
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
461d361330d6a24030016012aa6e920c
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0e241f8a0e32f5849c1879bd3bc73fcade47e375
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
473cf11bc355d074e0289ab7523931ed0868b056d0b0d3aa434d43524ac013f3
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
81d473db58273d5ed4738fe0c68a614d82590d7ef2c68dea746f40c93413f5e63f139faedb9d5afc9fc20dc5f21ae2103fd7933f2f10915fd05e96207681c242
|