@expo/ui 55.0.1 → 55.0.3
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 +58 -0
- package/CONTRIBUTING.md +30 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/AnimatedVisibilityView.kt +130 -0
- package/android/src/main/java/expo/modules/ui/CardView.kt +138 -34
- package/android/src/main/java/expo/modules/ui/CheckboxView.kt +98 -0
- package/android/src/main/java/expo/modules/ui/ChipView.kt +267 -142
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +302 -31
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +204 -57
- package/android/src/main/java/expo/modules/ui/HorizontalFloatingToolbarView.kt +21 -8
- package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +149 -40
- package/android/src/main/java/expo/modules/ui/ProgressView.kt +189 -89
- package/android/src/main/java/expo/modules/ui/RNHostView.kt +204 -50
- package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +3 -7
- package/android/src/main/java/expo/modules/ui/SegmentedButtonView.kt +115 -0
- package/android/src/main/java/expo/modules/ui/SegmentedControlView.kt +35 -0
- package/android/src/main/java/expo/modules/ui/SliderView.kt +70 -12
- package/android/src/main/java/expo/modules/ui/SwitchView.kt +62 -104
- package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +95 -57
- package/android/src/main/java/expo/modules/ui/button/Button.kt +117 -158
- package/android/src/main/java/expo/modules/ui/button/FloatingActionButton.kt +92 -0
- package/android/src/main/java/expo/modules/ui/button/IconButton.kt +73 -80
- package/android/src/main/java/expo/modules/ui/convertibles/AnimatableFloat.kt +26 -0
- package/android/src/main/java/expo/modules/ui/convertibles/AnimationSpecParams.kt +93 -0
- package/android/src/main/java/expo/modules/ui/convertibles/GraphicsLayerParams.kt +24 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +39 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuItem.kt +70 -0
- package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +18 -0
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts +134 -0
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts.map +1 -0
- package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts +3 -0
- package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts.map +1 -0
- package/build/jetpack-compose/Button/index.d.ts +65 -51
- package/build/jetpack-compose/Button/index.d.ts.map +1 -1
- package/build/jetpack-compose/Card/index.d.ts +72 -14
- package/build/jetpack-compose/Card/index.d.ts.map +1 -1
- package/build/jetpack-compose/Checkbox/index.d.ts +73 -0
- package/build/jetpack-compose/Checkbox/index.d.ts.map +1 -0
- package/build/jetpack-compose/Chip/index.d.ts +247 -27
- package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +137 -3
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +70 -0
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts +68 -0
- package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -0
- package/build/jetpack-compose/FloatingActionButton/index.d.ts +150 -0
- package/build/jetpack-compose/FloatingActionButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +2 -2
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
- package/build/jetpack-compose/IconButton/index.d.ts +45 -29
- package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts +17 -0
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts.map +1 -0
- package/build/jetpack-compose/Progress/index.d.ts +78 -35
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/RadioButton/index.d.ts +2 -2
- package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/SegmentedButton/index.d.ts +74 -0
- package/build/jetpack-compose/SegmentedButton/index.d.ts.map +1 -0
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts +17 -0
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts.map +1 -0
- package/build/jetpack-compose/Slider/index.d.ts +34 -10
- package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
- package/build/jetpack-compose/Spacer/index.d.ts +2 -2
- package/build/jetpack-compose/Switch/index.d.ts +25 -47
- package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
- package/build/jetpack-compose/ToggleButton/index.d.ts +60 -32
- package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/index.d.ts +5 -4
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers/animation.d.ts +44 -0
- package/build/jetpack-compose/modifiers/animation.d.ts.map +1 -0
- package/build/jetpack-compose/modifiers/index.d.ts +68 -4
- package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/AccessoryWidgetBackground/index.d.ts +4 -0
- package/build/swift-ui/AccessoryWidgetBackground/index.d.ts.map +1 -0
- package/build/swift-ui/ConfirmationDialog/index.d.ts.map +1 -1
- package/build/swift-ui/ContextMenu/index.d.ts.map +1 -1
- package/build/swift-ui/ControlGroup/index.d.ts +29 -0
- package/build/swift-ui/ControlGroup/index.d.ts.map +1 -0
- package/build/swift-ui/Gauge/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.map +1 -1
- package/build/swift-ui/LabeledContent/index.d.ts.map +1 -1
- package/build/swift-ui/Menu/index.d.ts.map +1 -1
- package/build/swift-ui/Picker/index.d.ts.map +1 -1
- package/build/swift-ui/Popover/index.d.ts.map +1 -1
- package/build/swift-ui/ProgressView/index.d.ts +1 -5
- package/build/swift-ui/ProgressView/index.d.ts.map +1 -1
- package/build/swift-ui/Section/index.d.ts.map +1 -1
- package/build/swift-ui/Slider/index.d.ts.map +1 -1
- package/build/swift-ui/SlotView.d.ts +5 -0
- package/build/swift-ui/SlotView.d.ts.map +1 -0
- package/build/swift-ui/Stepper/index.d.ts +3 -3
- package/build/swift-ui/Stepper/index.d.ts.map +1 -1
- package/build/swift-ui/Text/index.d.ts +33 -1
- package/build/swift-ui/Text/index.d.ts.map +1 -1
- package/build/swift-ui/index.d.ts +2 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +54 -1
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/shapes/index.d.ts +2 -2
- package/build/swift-ui/types.d.ts +7 -0
- package/build/swift-ui/types.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/AccessoryWidgetBackgroundView.swift +27 -0
- package/ios/BottomSheetView.swift +1 -6
- package/ios/ClosedRangeDateRecord.swift +10 -0
- package/ios/ColorPickerView.swift +9 -8
- package/ios/ConfirmationDialog/ConfirmationDialog.swift +7 -15
- package/ios/ConfirmationDialog/ConfirmationDialogProps.swift +0 -5
- package/ios/ContextMenu/ContextMenu.swift +27 -22
- package/ios/ContextMenu/ContextMenuRecords.swift +0 -6
- package/ios/ControlGroupView.swift +33 -0
- package/ios/DatePickerView.swift +7 -5
- package/ios/DisclosureGroupView.swift +5 -7
- package/ios/ExpoUIModule.swift +10 -32
- package/ios/GaugeView.swift +4 -26
- package/ios/HostView.swift +1 -2
- package/ios/ImageView.swift +22 -11
- package/ios/Label.swift +2 -17
- package/ios/LabeledContentView.swift +3 -27
- package/ios/ListView.swift +6 -14
- package/ios/Menu/MenuRecords.swift +0 -2
- package/ios/Menu/MenuView.swift +2 -5
- package/ios/Modifiers/DefaultScrollAnchorForRoleModifier.swift +32 -0
- package/ios/Modifiers/DefaultScrollAnchorModifier.swift +16 -0
- package/ios/Modifiers/ResizableModifier.swift +24 -0
- package/ios/Modifiers/Rotation3DEffectModifier.swift +20 -0
- package/ios/Modifiers/View+ModifierArray.swift +29 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +37 -3
- package/ios/Modifiers/WidgetModifiers.swift +46 -0
- package/ios/Picker/PickerView.swift +8 -16
- package/ios/Popover/PopoverProps.swift +0 -4
- package/ios/Popover/PopoverView.swift +5 -11
- package/ios/ProgressView.swift +0 -5
- package/ios/RNHostView.swift +91 -10
- package/ios/SectionView.swift +9 -17
- package/ios/SecureFieldView.swift +0 -1
- package/ios/ShareLink/ShareLinkView.swift +1 -1
- package/ios/SliderView.swift +16 -31
- package/ios/SlotView.swift +38 -0
- package/ios/StepperView.swift +12 -16
- package/ios/TextFieldView.swift +0 -1
- package/ios/TextView.swift +37 -1
- package/ios/Toggle/ToggleView.swift +5 -7
- package/ios/UIBaseView.swift +34 -3
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.1/expo.modules.ui-55.0.1.module → 55.0.3/expo.modules.ui-55.0.3.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.1/expo.modules.ui-55.0.1.pom → 55.0.3/expo.modules.ui-55.0.3.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.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 +5 -2
- package/src/jetpack-compose/AnimatedVisibility/index.tsx +206 -0
- package/src/jetpack-compose/AnimatedVisibility/symbols.ts +8 -0
- package/src/jetpack-compose/Button/index.tsx +69 -92
- package/src/jetpack-compose/Card/index.tsx +105 -29
- package/src/jetpack-compose/Checkbox/index.tsx +126 -0
- package/src/jetpack-compose/Chip/index.tsx +391 -51
- package/src/jetpack-compose/DatePicker/index.tsx +215 -6
- package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +126 -0
- package/src/jetpack-compose/DropdownMenu/index.tsx +107 -0
- package/src/jetpack-compose/FloatingActionButton/index.tsx +207 -0
- package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +4 -2
- package/src/jetpack-compose/IconButton/index.tsx +49 -56
- package/src/jetpack-compose/MultiChoiceSegmentedButtonRow/index.tsx +34 -0
- package/src/jetpack-compose/Progress/index.tsx +120 -62
- package/src/jetpack-compose/RadioButton/index.tsx +8 -9
- package/src/jetpack-compose/SegmentedButton/index.tsx +109 -0
- package/src/jetpack-compose/SingleChoiceSegmentedButtonRow/index.tsx +34 -0
- package/src/jetpack-compose/Slider/index.tsx +76 -29
- package/src/jetpack-compose/Spacer/index.tsx +2 -2
- package/src/jetpack-compose/Switch/index.tsx +32 -84
- package/src/jetpack-compose/ToggleButton/index.tsx +67 -43
- package/src/jetpack-compose/index.ts +5 -4
- package/src/jetpack-compose/modifiers/animation.ts +37 -0
- package/src/jetpack-compose/modifiers/index.ts +86 -6
- package/src/swift-ui/AccessoryWidgetBackground/index.tsx +12 -0
- package/src/swift-ui/ConfirmationDialog/index.tsx +4 -12
- package/src/swift-ui/ContextMenu/index.tsx +6 -20
- package/src/swift-ui/ControlGroup/index.tsx +59 -0
- package/src/swift-ui/Gauge/index.tsx +5 -20
- package/src/swift-ui/Image/index.tsx +7 -1
- package/src/swift-ui/Label/index.tsx +2 -5
- package/src/swift-ui/LabeledContent/index.tsx +3 -12
- package/src/swift-ui/Menu/index.tsx +2 -6
- package/src/swift-ui/Picker/index.tsx +4 -11
- package/src/swift-ui/Popover/index.tsx +3 -12
- package/src/swift-ui/ProgressView/index.tsx +1 -3
- package/src/swift-ui/Section/index.tsx +4 -9
- package/src/swift-ui/Slider/index.tsx +4 -12
- package/src/swift-ui/SlotView.tsx +8 -0
- package/src/swift-ui/Stepper/index.tsx +7 -7
- package/src/swift-ui/Text/index.tsx +66 -2
- package/src/swift-ui/index.tsx +2 -0
- package/src/swift-ui/modifiers/index.ts +87 -1
- package/src/swift-ui/types.ts +5 -0
- package/android/src/main/java/expo/modules/ui/FilterChipView.kt +0 -59
- package/android/src/main/java/expo/modules/ui/PickerView.kt +0 -161
- package/android/src/main/java/expo/modules/ui/TextButtonView.kt +0 -33
- package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +0 -183
- package/android/src/main/java/expo/modules/ui/menu/ContextMenuRecords.kt +0 -64
- package/build/jetpack-compose/Button/types.d.ts +0 -5
- package/build/jetpack-compose/Button/types.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts +0 -17
- package/build/jetpack-compose/ContextMenu/Submenu.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/index.d.ts +0 -65
- package/build/jetpack-compose/ContextMenu/index.d.ts.map +0 -1
- package/build/jetpack-compose/ContextMenu/utils.d.ts +0 -24
- package/build/jetpack-compose/ContextMenu/utils.d.ts.map +0 -1
- package/build/jetpack-compose/FilterChip/index.d.ts +0 -49
- package/build/jetpack-compose/FilterChip/index.d.ts.map +0 -1
- package/build/jetpack-compose/Picker/index.d.ts +0 -62
- package/build/jetpack-compose/Picker/index.d.ts.map +0 -1
- package/build/jetpack-compose/TextButton/index.d.ts +0 -29
- package/build/jetpack-compose/TextButton/index.d.ts.map +0 -1
- package/ios/ConfirmationDialog/ConfirmationDialogComponents.swift +0 -26
- package/ios/ContextMenu/ContextMenuComponents.swift +0 -37
- package/ios/Menu/MenuComponents.swift +0 -12
- package/ios/Picker/PickerComponents.swift +0 -24
- package/ios/Popover/PopoverComponents.swift +0 -18
- package/ios/SectionComponents.swift +0 -34
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha512 +0 -1
- package/src/jetpack-compose/Button/types.ts +0 -57
- package/src/jetpack-compose/ContextMenu/Submenu.tsx +0 -21
- package/src/jetpack-compose/ContextMenu/index.tsx +0 -149
- package/src/jetpack-compose/ContextMenu/utils.ts +0 -144
- package/src/jetpack-compose/FilterChip/index.tsx +0 -89
- package/src/jetpack-compose/Picker/index.tsx +0 -90
- package/src/jetpack-compose/TextButton/index.tsx +0 -55
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright 2025-present 650 Industries. All rights reserved.
|
|
2
|
-
|
|
3
|
-
import SwiftUI
|
|
4
|
-
import ExpoModulesCore
|
|
5
|
-
|
|
6
|
-
internal final class SectionHeaderProps: ExpoSwiftUI.ViewProps {}
|
|
7
|
-
|
|
8
|
-
internal final class SectionFooterProps: ExpoSwiftUI.ViewProps {}
|
|
9
|
-
|
|
10
|
-
internal final class SectionContentProps: ExpoSwiftUI.ViewProps {}
|
|
11
|
-
|
|
12
|
-
internal struct SectionHeader: ExpoSwiftUI.View {
|
|
13
|
-
@ObservedObject var props: SectionHeaderProps
|
|
14
|
-
|
|
15
|
-
var body: some View {
|
|
16
|
-
Children()
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
internal struct SectionFooter: ExpoSwiftUI.View {
|
|
21
|
-
@ObservedObject var props: SectionFooterProps
|
|
22
|
-
|
|
23
|
-
var body: some View {
|
|
24
|
-
Children()
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
internal struct SectionContent: ExpoSwiftUI.View {
|
|
29
|
-
@ObservedObject var props: SectionContentProps
|
|
30
|
-
|
|
31
|
-
var body: some View {
|
|
32
|
-
Children()
|
|
33
|
-
}
|
|
34
|
-
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar
DELETED
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d9047cbc88b3f7cbf9728460e27dd43d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6e19bff717c5770bfbfab0f7b94f6e98217dc504
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
addee5fe747747c7459fb227f67189cd0c0a064fe2a037ed67057c560e7fb335
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fe721d26e09241994a20838afa7aecfcd15a3c74bb104a3b42753cb73608ad6784f0d820db4b654b6fd65df1165574b8353040f8d0a2161c2e3413e18c2b9b79
|
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
28406ef3849bb822054f845e1e731d11
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6c884449165b70583d08844b02f31ab547df4438
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
981050003cd4b3d57f26a29a9e0466bdbdae41cc8df253b571858ba1e46a6ab9
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
35a4fa077be99bf9bebfd55d3398894d0150be4a5a60503d407a6a487290f5b2fdd0b0624986ef2781097d50a3c1fe973786fd79a738e94d1de0228b04ab3e01
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
dcd81b9829aa223dc95f2f3860fa6176
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0234885a7f69e8c23962b199fca0a04c3c349795
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ee674de6e76134c2823dcdb8688a898ebc3f27a2431fdc45d332440f1566bfc1
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9e3ea394afad0eca4e6ede1fa254b1ebd4ac024b51283b581e43e585776e805f7277869f9941af2736caf58a9a6a491721b9ccfeb3c708a9321d5ca19e7b11f3
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1310c75f7f329fec86644d7d5eaac15b
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2e1ae4bece93cfdf9286e263af23d312a8471733
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b2c706f5e3d5fd8de972562658efbfcf2286089535d5c82a6d702e1e223c46c2
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2bbf17d9a76db0c5ccd9e366ecfe0aa07e33a3b333f58d580b8dd16979ed222db0270213fe561d8dd9b69a1163525abaceadd66405289d1a0dc164322512acad
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
type Variant = 'rounded' | 'twotone' | 'outlined' | 'filled' | 'sharp';
|
|
2
|
-
|
|
3
|
-
type Icon =
|
|
4
|
-
| 'AccountBox'
|
|
5
|
-
| 'AccountCircle'
|
|
6
|
-
| 'Add'
|
|
7
|
-
| 'AddCircle'
|
|
8
|
-
| 'ArrowBack'
|
|
9
|
-
| 'ArrowDropDown'
|
|
10
|
-
| 'ArrowForward'
|
|
11
|
-
| 'Build'
|
|
12
|
-
| 'Call'
|
|
13
|
-
| 'Check'
|
|
14
|
-
| 'CheckCircle'
|
|
15
|
-
| 'Clear'
|
|
16
|
-
| 'Close'
|
|
17
|
-
| 'Contrast'
|
|
18
|
-
| 'Create'
|
|
19
|
-
| 'DarkMode'
|
|
20
|
-
| 'DateRange'
|
|
21
|
-
| 'Delete'
|
|
22
|
-
| 'Done'
|
|
23
|
-
| 'Edit'
|
|
24
|
-
| 'Email'
|
|
25
|
-
| 'ExitToApp'
|
|
26
|
-
| 'Face'
|
|
27
|
-
| 'Favorite'
|
|
28
|
-
| 'FavoriteBorder'
|
|
29
|
-
| 'Home'
|
|
30
|
-
| 'Info'
|
|
31
|
-
| 'KeyboardArrowDown'
|
|
32
|
-
| 'KeyboardArrowLeft'
|
|
33
|
-
| 'KeyboardArrowRight'
|
|
34
|
-
| 'KeyboardArrowUp'
|
|
35
|
-
| 'LightMode'
|
|
36
|
-
| 'List'
|
|
37
|
-
| 'LocationOn'
|
|
38
|
-
| 'Lock'
|
|
39
|
-
| 'MailOutline'
|
|
40
|
-
| 'Menu'
|
|
41
|
-
| 'MoreVert'
|
|
42
|
-
| 'Notifications'
|
|
43
|
-
| 'Person'
|
|
44
|
-
| 'Phone'
|
|
45
|
-
| 'Place'
|
|
46
|
-
| 'PlayArrow'
|
|
47
|
-
| 'Refresh'
|
|
48
|
-
| 'Search'
|
|
49
|
-
| 'Send'
|
|
50
|
-
| 'Settings'
|
|
51
|
-
| 'Share'
|
|
52
|
-
| 'ShoppingCart'
|
|
53
|
-
| 'Star'
|
|
54
|
-
| 'ThumbUp'
|
|
55
|
-
| 'Warning';
|
|
56
|
-
|
|
57
|
-
export type MaterialIcon = `${Variant}.${Icon}`;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
import { ButtonProps } from '../Button';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Props of the `Submenu` component.
|
|
7
|
-
*/
|
|
8
|
-
export type SubmenuProps = {
|
|
9
|
-
/**
|
|
10
|
-
* The button that will be used to expand the submenu. On Android the `text` prop of the `Button` will be used as a section title.
|
|
11
|
-
*/
|
|
12
|
-
button: ReactElement<ButtonProps>;
|
|
13
|
-
/**
|
|
14
|
-
* Children of the submenu. Only `Button`, `Switch`, `Picker` and `Submenu` elements should be used.
|
|
15
|
-
*/
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export function Submenu(props: SubmenuProps) {
|
|
20
|
-
return <></>;
|
|
21
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { requireNativeView } from 'expo';
|
|
2
|
-
import { Children, ReactElement, ReactNode, useMemo } from 'react';
|
|
3
|
-
import { NativeSyntheticEvent, StyleProp, ViewStyle, type ColorValue } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import { SubmenuProps } from './Submenu';
|
|
6
|
-
import { MenuElement, transformChildrenToElementArray } from './utils';
|
|
7
|
-
import { ModifierConfig } from '../../types';
|
|
8
|
-
import { ButtonProps } from '../Button';
|
|
9
|
-
import { PickerProps } from '../Picker';
|
|
10
|
-
import { SwitchProps } from '../Switch';
|
|
11
|
-
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
12
|
-
|
|
13
|
-
const MenuNativeView: React.ComponentType<NativeMenuProps> = requireNativeView(
|
|
14
|
-
'ExpoUI',
|
|
15
|
-
'ContextMenuView'
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
type SubmenuElement =
|
|
19
|
-
| ReactElement<ButtonProps>
|
|
20
|
-
| ReactElement<SwitchProps>
|
|
21
|
-
| ReactElement<PickerProps>
|
|
22
|
-
| ReactElement<SubmenuProps>;
|
|
23
|
-
|
|
24
|
-
export type ContextMenuContentProps = {
|
|
25
|
-
children: SubmenuElement | SubmenuElement[];
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @hidden
|
|
30
|
-
*/
|
|
31
|
-
export type EventHandlers = Record<
|
|
32
|
-
string,
|
|
33
|
-
Record<string, (event: NativeSyntheticEvent<any>) => void>
|
|
34
|
-
>;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @hidden
|
|
38
|
-
*/
|
|
39
|
-
export type ContextMenuElementBase = { contextMenuElementID: string };
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Props of the `ContextMenu` component.
|
|
43
|
-
*/
|
|
44
|
-
export type ContextMenuProps = {
|
|
45
|
-
/**
|
|
46
|
-
* The contents of the submenu are used as an anchor for the context menu.
|
|
47
|
-
* The children will be wrapped in a pressable element, which triggers opening of the context menu.
|
|
48
|
-
*/
|
|
49
|
-
children: ReactNode;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The color of the container holding the context menu items.
|
|
53
|
-
*/
|
|
54
|
-
color?: ColorValue;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Optional styles to apply to the `ContextMenu`.
|
|
58
|
-
*/
|
|
59
|
-
style?: StyleProp<ViewStyle>;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Modifiers for the component.
|
|
63
|
-
*/
|
|
64
|
-
modifiers?: ModifierConfig[];
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @hidden
|
|
69
|
-
*/
|
|
70
|
-
type NativeMenuProps = ContextMenuProps & {
|
|
71
|
-
elements: MenuElement[];
|
|
72
|
-
onContextMenuButtonPressed: (
|
|
73
|
-
event: NativeSyntheticEvent<{ contextMenuElementID: string }>
|
|
74
|
-
) => void;
|
|
75
|
-
onContextMenuSwitchValueChanged: (
|
|
76
|
-
event: NativeSyntheticEvent<{
|
|
77
|
-
contextMenuElementID: string;
|
|
78
|
-
value: boolean;
|
|
79
|
-
}>
|
|
80
|
-
) => void;
|
|
81
|
-
onContextMenuPickerOptionSelected: (
|
|
82
|
-
event: NativeSyntheticEvent<{
|
|
83
|
-
index: number;
|
|
84
|
-
label: string;
|
|
85
|
-
contextMenuElementID: string;
|
|
86
|
-
}>
|
|
87
|
-
) => void;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export function Items(props: ContextMenuContentProps) {
|
|
91
|
-
return <></>;
|
|
92
|
-
}
|
|
93
|
-
Items.tag = 'Items';
|
|
94
|
-
|
|
95
|
-
export function Trigger(props: { children: React.ReactNode }) {
|
|
96
|
-
return <></>;
|
|
97
|
-
}
|
|
98
|
-
Trigger.tag = 'Trigger';
|
|
99
|
-
|
|
100
|
-
export function Preview(props: { children: React.ReactNode }) {
|
|
101
|
-
return <></>;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function ContextMenu(props: ContextMenuProps) {
|
|
105
|
-
const { modifiers, ...restProps } = props;
|
|
106
|
-
const eventHandlersMap: EventHandlers = {};
|
|
107
|
-
const initialChildren = Children.map(
|
|
108
|
-
props.children as any,
|
|
109
|
-
(c: { type: { tag: string }; props: { children: React.ReactNode } }) =>
|
|
110
|
-
c.type.tag === Items.tag ? c.props.children : null
|
|
111
|
-
);
|
|
112
|
-
const processedElements = useMemo(
|
|
113
|
-
() => transformChildrenToElementArray(initialChildren, eventHandlersMap),
|
|
114
|
-
[initialChildren]
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
const activationElement = Children.map(
|
|
118
|
-
props.children as any,
|
|
119
|
-
(c: { type: { tag: string }; props: { children: React.ReactNode } }) =>
|
|
120
|
-
c.type.tag === Trigger.tag ? c.props.children : null
|
|
121
|
-
);
|
|
122
|
-
|
|
123
|
-
const createEventHandler =
|
|
124
|
-
(handlerType: string) => (e: NativeSyntheticEvent<{ contextMenuElementID: string }>) => {
|
|
125
|
-
const handler = eventHandlersMap[e.nativeEvent.contextMenuElementID]?.[handlerType];
|
|
126
|
-
handler?.(e);
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
return (
|
|
130
|
-
<MenuNativeView
|
|
131
|
-
style={props.style}
|
|
132
|
-
elements={processedElements}
|
|
133
|
-
onContextMenuButtonPressed={createEventHandler('onPress')}
|
|
134
|
-
onContextMenuSwitchValueChanged={createEventHandler('onValueChange')}
|
|
135
|
-
onContextMenuPickerOptionSelected={createEventHandler('onOptionSelected')}
|
|
136
|
-
modifiers={modifiers}
|
|
137
|
-
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
138
|
-
{...restProps}>
|
|
139
|
-
{activationElement}
|
|
140
|
-
</MenuNativeView>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
ContextMenu.Trigger = Trigger;
|
|
145
|
-
ContextMenu.Preview = Preview;
|
|
146
|
-
ContextMenu.Items = Items;
|
|
147
|
-
|
|
148
|
-
export { ContextMenu };
|
|
149
|
-
export { Submenu } from './Submenu';
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { Children, isValidElement, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { NativeSyntheticEvent } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { Submenu, SubmenuProps } from './Submenu';
|
|
5
|
-
import { ContextMenuElementBase, EventHandlers } from './index';
|
|
6
|
-
import { Button, ButtonProps, NativeButtonProps, transformButtonProps } from '../Button';
|
|
7
|
-
import { Picker, PickerProps } from '../Picker';
|
|
8
|
-
import { Switch, SwitchProps } from '../Switch';
|
|
9
|
-
|
|
10
|
-
// We use this slightly odd typing for the elements to make unpacking the elements easier on the native side
|
|
11
|
-
type ButtonMenuElement = {
|
|
12
|
-
button: NativeButtonProps;
|
|
13
|
-
} & ContextMenuElementBase;
|
|
14
|
-
|
|
15
|
-
type SwitchMenuElement = {
|
|
16
|
-
switch: SwitchProps;
|
|
17
|
-
} & ContextMenuElementBase;
|
|
18
|
-
|
|
19
|
-
type PickerMenuElement = {
|
|
20
|
-
picker: PickerProps;
|
|
21
|
-
} & ContextMenuElementBase;
|
|
22
|
-
|
|
23
|
-
type SubmenuElement = {
|
|
24
|
-
submenu: {
|
|
25
|
-
elements: MenuElement[];
|
|
26
|
-
button: NativeButtonProps;
|
|
27
|
-
};
|
|
28
|
-
} & ContextMenuElementBase;
|
|
29
|
-
|
|
30
|
-
export type MenuElement =
|
|
31
|
-
| ButtonMenuElement
|
|
32
|
-
| SwitchMenuElement
|
|
33
|
-
| PickerMenuElement
|
|
34
|
-
| SubmenuElement;
|
|
35
|
-
|
|
36
|
-
// Maps the react children to NativeMenuElement[] which is used to render out the native menu
|
|
37
|
-
// TODO: Ideally we want to pass the children directly to the native side without having to do this
|
|
38
|
-
export function transformChildrenToElementArray(
|
|
39
|
-
children: ReactNode,
|
|
40
|
-
eventHandlersMap: EventHandlers
|
|
41
|
-
): MenuElement[] {
|
|
42
|
-
return Children.toArray(children)
|
|
43
|
-
.map((child) => processChildElement(child, eventHandlersMap))
|
|
44
|
-
.filter((el): el is MenuElement => el !== null);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function processChildElement(
|
|
48
|
-
child: ReactNode,
|
|
49
|
-
eventHandlersMap: EventHandlers
|
|
50
|
-
): MenuElement | null {
|
|
51
|
-
if (!isValidElement(child)) return null;
|
|
52
|
-
|
|
53
|
-
const uuid = expo.uuidv4();
|
|
54
|
-
|
|
55
|
-
if (child.type === Button) {
|
|
56
|
-
// @ts-expect-error TODO TS2345: Argument of type unknown is not assignable to parameter of type SubmenuProps
|
|
57
|
-
return createButtonElement(uuid, child.props, eventHandlersMap);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (child.type === Switch) {
|
|
61
|
-
// @ts-expect-error TODO TS2345: Argument of type unknown is not assignable to parameter of type SubmenuProps
|
|
62
|
-
return createSwitchElement(uuid, child.props, eventHandlersMap);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (child.type === Picker) {
|
|
66
|
-
// @ts-expect-error TODO TS2345: Argument of type unknown is not assignable to parameter of type SubmenuProps
|
|
67
|
-
return createPickerElement(uuid, child.props, eventHandlersMap);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (isSubmenuComponent(child)) {
|
|
71
|
-
// @ts-expect-error TODO TS2345: Argument of type unknown is not assignable to parameter of type SubmenuProps
|
|
72
|
-
return createSubmenuElement(uuid, child.props, eventHandlersMap);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
console.warn('Unsupported child type in Menu: ', child.type);
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function createButtonElement(
|
|
80
|
-
uuid: string,
|
|
81
|
-
props: ButtonProps,
|
|
82
|
-
handlers: EventHandlers
|
|
83
|
-
): MenuElement {
|
|
84
|
-
if (props.onPress) {
|
|
85
|
-
handlers[uuid] = { onPress: props.onPress };
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
contextMenuElementID: uuid,
|
|
90
|
-
button: transformButtonProps(props),
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function createSwitchElement(
|
|
95
|
-
uuid: string,
|
|
96
|
-
props: SwitchProps,
|
|
97
|
-
handlers: EventHandlers
|
|
98
|
-
): MenuElement {
|
|
99
|
-
if (props.onValueChange) {
|
|
100
|
-
handlers[uuid] = {
|
|
101
|
-
onValueChange: ({ nativeEvent: { value } }: NativeSyntheticEvent<{ value: boolean }>) => {
|
|
102
|
-
props.onValueChange?.(value);
|
|
103
|
-
},
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return {
|
|
108
|
-
contextMenuElementID: uuid,
|
|
109
|
-
switch: props,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function createPickerElement(
|
|
114
|
-
uuid: string,
|
|
115
|
-
props: PickerProps,
|
|
116
|
-
handlers: EventHandlers
|
|
117
|
-
): MenuElement {
|
|
118
|
-
if (props.onOptionSelected) {
|
|
119
|
-
handlers[uuid] = { onOptionSelected: props.onOptionSelected };
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return {
|
|
123
|
-
contextMenuElementID: uuid,
|
|
124
|
-
picker: props,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function createSubmenuElement(
|
|
129
|
-
uuid: string,
|
|
130
|
-
props: SubmenuProps,
|
|
131
|
-
handlers: EventHandlers
|
|
132
|
-
): MenuElement {
|
|
133
|
-
return {
|
|
134
|
-
contextMenuElementID: uuid,
|
|
135
|
-
submenu: {
|
|
136
|
-
button: transformButtonProps(props.button.props),
|
|
137
|
-
elements: transformChildrenToElementArray(props.children, handlers),
|
|
138
|
-
},
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function isSubmenuComponent(child: ReactElement): boolean {
|
|
143
|
-
return child.type === Submenu;
|
|
144
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { requireNativeView } from 'expo';
|
|
2
|
-
|
|
3
|
-
import { ExpoModifier } from '../../types';
|
|
4
|
-
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
5
|
-
|
|
6
|
-
export type FilterChipProps = {
|
|
7
|
-
/**
|
|
8
|
-
* Whether the chip is currently selected.
|
|
9
|
-
*/
|
|
10
|
-
selected: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* The text label to display on the chip.
|
|
13
|
-
*/
|
|
14
|
-
label: string;
|
|
15
|
-
/**
|
|
16
|
-
* Whether the chip is enabled and can be interacted with.
|
|
17
|
-
*/
|
|
18
|
-
enabled?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Callback fired when the chip is clicked.
|
|
21
|
-
*/
|
|
22
|
-
onPress?: () => void;
|
|
23
|
-
/**
|
|
24
|
-
* Modifiers for the component.
|
|
25
|
-
*/
|
|
26
|
-
modifiers?: ExpoModifier[];
|
|
27
|
-
/**
|
|
28
|
-
* Children containing LeadingIcon and TrailingIcon slots.
|
|
29
|
-
*/
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
type SlotChildProps = {
|
|
34
|
-
children: React.ReactNode;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
type NativeFilterChipProps = FilterChipProps;
|
|
38
|
-
|
|
39
|
-
type NativeSlotViewProps = {
|
|
40
|
-
slotName: string;
|
|
41
|
-
children: React.ReactNode;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const FilterChipNativeView: React.ComponentType<NativeFilterChipProps> = requireNativeView(
|
|
45
|
-
'ExpoUI',
|
|
46
|
-
'FilterChipView'
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
const SlotNativeView: React.ComponentType<NativeSlotViewProps> = requireNativeView(
|
|
50
|
-
'ExpoUI',
|
|
51
|
-
'SlotView'
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Leading icon slot for FilterChip.
|
|
56
|
-
*/
|
|
57
|
-
function FilterChipLeadingIcon(props: SlotChildProps) {
|
|
58
|
-
return <SlotNativeView slotName="leadingIcon">{props.children}</SlotNativeView>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Trailing icon slot for FilterChip.
|
|
63
|
-
*/
|
|
64
|
-
function FilterChipTrailingIcon(props: SlotChildProps) {
|
|
65
|
-
return <SlotNativeView slotName="trailingIcon">{props.children}</SlotNativeView>;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* A filter chip component following Material 3 design guidelines.
|
|
70
|
-
* Supports slot-based `LeadingIcon` and `TrailingIcon` children.
|
|
71
|
-
*/
|
|
72
|
-
function FilterChipComponent(props: FilterChipProps) {
|
|
73
|
-
const { children, modifiers, onPress, ...restProps } = props;
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<FilterChipNativeView
|
|
77
|
-
modifiers={modifiers}
|
|
78
|
-
{...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
|
|
79
|
-
{...restProps}
|
|
80
|
-
onPress={onPress}>
|
|
81
|
-
{children}
|
|
82
|
-
</FilterChipNativeView>
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
FilterChipComponent.LeadingIcon = FilterChipLeadingIcon;
|
|
87
|
-
FilterChipComponent.TrailingIcon = FilterChipTrailingIcon;
|
|
88
|
-
|
|
89
|
-
export { FilterChipComponent as FilterChip };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { requireNativeView } from 'expo';
|
|
2
|
-
import { type ColorValue } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { ExpoModifier } from '../../types';
|
|
5
|
-
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Colors for picker's core elements.
|
|
9
|
-
*/
|
|
10
|
-
export type PickerElementColors = {
|
|
11
|
-
activeBorderColor?: ColorValue;
|
|
12
|
-
activeContentColor?: ColorValue;
|
|
13
|
-
inactiveBorderColor?: ColorValue;
|
|
14
|
-
inactiveContentColor?: ColorValue;
|
|
15
|
-
disabledActiveBorderColor?: ColorValue;
|
|
16
|
-
disabledActiveContentColor?: ColorValue;
|
|
17
|
-
disabledInactiveBorderColor?: ColorValue;
|
|
18
|
-
disabledInactiveContentColor?: ColorValue;
|
|
19
|
-
activeContainerColor?: ColorValue;
|
|
20
|
-
inactiveContainerColor?: ColorValue;
|
|
21
|
-
disabledActiveContainerColor?: ColorValue;
|
|
22
|
-
disabledInactiveContainerColor?: ColorValue;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export type PickerProps = {
|
|
26
|
-
/**
|
|
27
|
-
* An array of options to be displayed in the picker.
|
|
28
|
-
*/
|
|
29
|
-
options: string[];
|
|
30
|
-
/**
|
|
31
|
-
* The index of the currently selected option.
|
|
32
|
-
*/
|
|
33
|
-
selectedIndex: number | null;
|
|
34
|
-
/**
|
|
35
|
-
* Callback function that is called when an option is selected.
|
|
36
|
-
*/
|
|
37
|
-
onOptionSelected?: (event: { nativeEvent: { index: number; label: string } }) => void;
|
|
38
|
-
/**
|
|
39
|
-
* The variant of the picker, which determines its appearance and behavior.
|
|
40
|
-
* @default 'segmented'
|
|
41
|
-
*/
|
|
42
|
-
variant?: 'segmented' | 'radio';
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Colors for picker's core elements.
|
|
46
|
-
*/
|
|
47
|
-
elementColors?: PickerElementColors;
|
|
48
|
-
/**
|
|
49
|
-
* Picker color.
|
|
50
|
-
*/
|
|
51
|
-
color?: ColorValue;
|
|
52
|
-
/**
|
|
53
|
-
* Modifiers for the component.
|
|
54
|
-
*/
|
|
55
|
-
modifiers?: ExpoModifier[];
|
|
56
|
-
/** Modifiers for the individual buttons */
|
|
57
|
-
buttonModifiers?: ExpoModifier[];
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const PickerNativeView: React.ComponentType<PickerProps> = requireNativeView(
|
|
61
|
-
'ExpoUI',
|
|
62
|
-
'PickerView'
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
type NativePickerProps = PickerProps;
|
|
66
|
-
|
|
67
|
-
function transformPickerProps(props: PickerProps): NativePickerProps {
|
|
68
|
-
const { modifiers, ...restProps } = props;
|
|
69
|
-
return {
|
|
70
|
-
modifiers,
|
|
71
|
-
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
72
|
-
...restProps,
|
|
73
|
-
variant: props.variant ?? 'segmented',
|
|
74
|
-
elementColors: props.elementColors
|
|
75
|
-
? props.elementColors
|
|
76
|
-
: props.color
|
|
77
|
-
? {
|
|
78
|
-
activeContainerColor: props.color,
|
|
79
|
-
}
|
|
80
|
-
: undefined,
|
|
81
|
-
color: props.color,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Displays a native picker component. Depending on the variant it can be a segmented button, an inline picker, a list of choices or a radio button.
|
|
87
|
-
*/
|
|
88
|
-
export function Picker(props: PickerProps) {
|
|
89
|
-
return <PickerNativeView {...transformPickerProps(props)} />;
|
|
90
|
-
}
|