@expo/ui 0.2.0-alpha.0 → 0.2.0-alpha.2
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 +15 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/AlertDialogView.kt +3 -1
- package/android/src/main/java/expo/modules/ui/ComposeViews.kt +6 -6
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +4 -3
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +88 -0
- package/android/src/main/java/expo/modules/ui/Modifiers.kt +15 -0
- package/android/src/main/java/expo/modules/ui/PickerView.kt +7 -2
- package/android/src/main/java/expo/modules/ui/ProgressView.kt +8 -4
- package/android/src/main/java/expo/modules/ui/ShapeView.kt +3 -2
- package/android/src/main/java/expo/modules/ui/SliderView.kt +4 -2
- package/android/src/main/java/expo/modules/ui/SwitchView.kt +3 -2
- package/android/src/main/java/expo/modules/ui/TextInputView.kt +4 -2
- package/android/src/main/java/expo/modules/ui/button/Button.kt +17 -8
- package/build/jetpack-compose/AlertDialog/index.d.ts +3 -0
- package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
- package/build/jetpack-compose/AlertDialog/index.js +3 -1
- package/build/jetpack-compose/AlertDialog/index.js.map +1 -1
- package/build/jetpack-compose/Button/index.d.ts +3 -1
- package/build/jetpack-compose/Button/index.d.ts.map +1 -1
- package/build/jetpack-compose/Button/index.js +2 -0
- package/build/jetpack-compose/Button/index.js.map +1 -1
- package/build/jetpack-compose/ContextMenu/index.d.ts +3 -0
- package/build/jetpack-compose/ContextMenu/index.d.ts.map +1 -1
- package/build/jetpack-compose/ContextMenu/index.js +3 -1
- package/build/jetpack-compose/ContextMenu/index.js.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +3 -1
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/DatePicker/index.js +2 -0
- package/build/jetpack-compose/DatePicker/index.js.map +1 -1
- package/build/jetpack-compose/Picker/index.d.ts +5 -0
- package/build/jetpack-compose/Picker/index.d.ts.map +1 -1
- package/build/jetpack-compose/Picker/index.js +4 -0
- package/build/jetpack-compose/Picker/index.js.map +1 -1
- package/build/jetpack-compose/Progress/index.d.ts +5 -0
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/Progress/index.js +4 -2
- package/build/jetpack-compose/Progress/index.js.map +1 -1
- package/build/jetpack-compose/Shape/index.d.ts +4 -1
- package/build/jetpack-compose/Shape/index.d.ts.map +1 -1
- package/build/jetpack-compose/Shape/index.js +3 -1
- package/build/jetpack-compose/Shape/index.js.map +1 -1
- package/build/jetpack-compose/Slider/index.d.ts +3 -1
- package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
- package/build/jetpack-compose/Slider/index.js +2 -0
- package/build/jetpack-compose/Slider/index.js.map +1 -1
- package/build/jetpack-compose/Switch/index.d.ts +3 -0
- package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
- package/build/jetpack-compose/Switch/index.js +2 -0
- package/build/jetpack-compose/Switch/index.js.map +1 -1
- package/build/jetpack-compose/TextInput/index.d.ts +3 -1
- package/build/jetpack-compose/TextInput/index.d.ts.map +1 -1
- package/build/jetpack-compose/TextInput/index.js +2 -0
- package/build/jetpack-compose/TextInput/index.js.map +1 -1
- package/build/jetpack-compose/index.d.ts +1 -0
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/index.js +1 -0
- package/build/jetpack-compose/index.js.map +1 -1
- package/build/jetpack-compose/modifiers.d.ts +14 -0
- package/build/jetpack-compose/modifiers.d.ts.map +1 -0
- package/build/jetpack-compose/modifiers.js +15 -0
- package/build/jetpack-compose/modifiers.js.map +1 -0
- package/build/swift-ui/BottomSheet/index.d.ts +2 -14
- package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
- package/build/swift-ui/BottomSheet/index.js +7 -15
- package/build/swift-ui/BottomSheet/index.js.map +1 -1
- package/build/swift-ui/Button/index.d.ts +6 -11
- package/build/swift-ui/Button/index.d.ts.map +1 -1
- package/build/swift-ui/Button/index.js +7 -14
- package/build/swift-ui/Button/index.js.map +1 -1
- package/build/swift-ui/ColorPicker/index.d.ts +3 -10
- package/build/swift-ui/ColorPicker/index.d.ts.map +1 -1
- package/build/swift-ui/ColorPicker/index.js +5 -14
- package/build/swift-ui/ColorPicker/index.js.map +1 -1
- package/build/{swift-ui-primitives/ContentUnavailableView.d.ts → swift-ui/ContentUnavailableView/index.d.ts} +3 -8
- package/build/swift-ui/ContentUnavailableView/index.d.ts.map +1 -0
- package/build/swift-ui/ContentUnavailableView/index.js +19 -0
- package/build/swift-ui/ContentUnavailableView/index.js.map +1 -0
- package/build/swift-ui/ContextMenu/Submenu.d.ts +21 -0
- package/build/swift-ui/ContextMenu/Submenu.d.ts.map +1 -0
- package/build/swift-ui/ContextMenu/Submenu.js +8 -0
- package/build/swift-ui/ContextMenu/Submenu.js.map +1 -0
- package/build/swift-ui/ContextMenu/index.d.ts +6 -87
- package/build/swift-ui/ContextMenu/index.d.ts.map +1 -1
- package/build/swift-ui/ContextMenu/index.js +11 -26
- package/build/swift-ui/ContextMenu/index.js.map +1 -1
- package/build/swift-ui/ContextMenu/types.d.ts +36 -0
- package/build/swift-ui/ContextMenu/types.d.ts.map +1 -0
- package/build/swift-ui/ContextMenu/types.js.map +1 -0
- package/build/swift-ui/ContextMenu/utils.d.ts +4 -4
- package/build/swift-ui/ContextMenu/utils.d.ts.map +1 -1
- package/build/swift-ui/ContextMenu/utils.js +7 -7
- package/build/swift-ui/ContextMenu/utils.js.map +1 -1
- package/build/swift-ui/DatePicker/index.d.ts +3 -21
- package/build/swift-ui/DatePicker/index.d.ts.map +1 -1
- package/build/swift-ui/DatePicker/index.js +6 -28
- package/build/swift-ui/DatePicker/index.js.map +1 -1
- package/build/{swift-ui-primitives/DisclosureGroup.d.ts → swift-ui/DisclosureGroup/index.d.ts} +2 -8
- package/build/swift-ui/DisclosureGroup/index.d.ts.map +1 -0
- package/build/swift-ui/DisclosureGroup/index.js +16 -0
- package/build/swift-ui/DisclosureGroup/index.js.map +1 -0
- package/build/{swift-ui-primitives/Form.d.ts → swift-ui/Form/index.d.ts} +2 -2
- package/build/swift-ui/Form/index.d.ts.map +1 -0
- package/build/swift-ui/Form/index.js +15 -0
- package/build/swift-ui/Form/index.js.map +1 -0
- package/build/swift-ui/Gauge/index.d.ts +4 -10
- package/build/swift-ui/Gauge/index.d.ts.map +1 -1
- package/build/swift-ui/Gauge/index.js +4 -20
- package/build/swift-ui/Gauge/index.js.map +1 -1
- package/build/swift-ui/Host/index.d.ts +2 -1
- package/build/swift-ui/Host/index.d.ts.map +1 -1
- package/build/swift-ui/Host/index.js +3 -2
- package/build/swift-ui/Host/index.js.map +1 -1
- package/build/{swift-ui-primitives/Image.d.ts → swift-ui/Image/index.d.ts} +2 -2
- package/build/swift-ui/Image/index.d.ts.map +1 -0
- package/build/{swift-ui-primitives/Image.js → swift-ui/Image/index.js} +5 -2
- package/build/swift-ui/Image/index.js.map +1 -0
- package/build/swift-ui/Label/index.d.ts +3 -10
- package/build/swift-ui/Label/index.d.ts.map +1 -1
- package/build/swift-ui/Label/index.js +3 -11
- package/build/swift-ui/Label/index.js.map +1 -1
- package/build/{swift-ui-primitives/Layout.d.ts → swift-ui/Layout/index.d.ts} +3 -3
- package/build/swift-ui/Layout/index.d.ts.map +1 -0
- package/build/{swift-ui-primitives/Layout.js → swift-ui/Layout/index.js} +15 -3
- package/build/swift-ui/Layout/index.js.map +1 -0
- package/build/swift-ui/List/index.d.ts +3 -34
- package/build/swift-ui/List/index.d.ts.map +1 -1
- package/build/swift-ui/List/index.js +7 -16
- package/build/swift-ui/List/index.js.map +1 -1
- package/build/swift-ui/Picker/index.d.ts +3 -16
- package/build/swift-ui/Picker/index.d.ts.map +1 -1
- package/build/swift-ui/Picker/index.js +7 -16
- package/build/swift-ui/Picker/index.js.map +1 -1
- package/build/swift-ui/Progress/index.d.ts +6 -19
- package/build/swift-ui/Progress/index.d.ts.map +1 -1
- package/build/swift-ui/Progress/index.js +5 -21
- package/build/swift-ui/Progress/index.js.map +1 -1
- package/build/swift-ui/Section/index.d.ts +4 -11
- package/build/swift-ui/Section/index.d.ts.map +1 -1
- package/build/swift-ui/Section/index.js +3 -11
- package/build/swift-ui/Section/index.js.map +1 -1
- package/build/swift-ui/SecureField/index.d.ts +3 -14
- package/build/swift-ui/SecureField/index.d.ts.map +1 -1
- package/build/swift-ui/SecureField/index.js +5 -14
- package/build/swift-ui/SecureField/index.js.map +1 -1
- package/build/swift-ui/ShareLink/index.d.ts +3 -10
- package/build/swift-ui/ShareLink/index.d.ts.map +1 -1
- package/build/swift-ui/ShareLink/index.js +3 -11
- package/build/swift-ui/ShareLink/index.js.map +1 -1
- package/build/swift-ui/Slider/index.d.ts +3 -15
- package/build/swift-ui/Slider/index.d.ts.map +1 -1
- package/build/swift-ui/Slider/index.js +7 -12
- package/build/swift-ui/Slider/index.js.map +1 -1
- package/build/{swift-ui-primitives/Spacer.d.ts → swift-ui/Spacer/index.d.ts} +2 -2
- package/build/swift-ui/Spacer/index.d.ts.map +1 -0
- package/build/swift-ui/Spacer/index.js +15 -0
- package/build/swift-ui/Spacer/index.js.map +1 -0
- package/build/swift-ui/Switch/index.d.ts +3 -20
- package/build/swift-ui/Switch/index.d.ts.map +1 -1
- package/build/swift-ui/Switch/index.js +7 -16
- package/build/swift-ui/Switch/index.js.map +1 -1
- package/build/{swift-ui-primitives/Text.d.ts → swift-ui/Text/index.d.ts} +2 -2
- package/build/swift-ui/Text/index.d.ts.map +1 -0
- package/build/{swift-ui-primitives/Text.js → swift-ui/Text/index.js} +5 -2
- package/build/swift-ui/Text/index.js.map +1 -0
- package/build/swift-ui/TextField/index.d.ts +4 -11
- package/build/swift-ui/TextField/index.d.ts.map +1 -1
- package/build/swift-ui/TextField/index.js +5 -14
- package/build/swift-ui/TextField/index.js.map +1 -1
- package/build/swift-ui/index.d.ts +7 -0
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/index.js +7 -0
- package/build/swift-ui/index.js.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +259 -0
- package/build/swift-ui/modifiers/index.d.ts.map +1 -0
- package/build/swift-ui/modifiers/index.js +224 -0
- package/build/swift-ui/modifiers/index.js.map +1 -0
- package/build/swift-ui/modifiers/utils.d.ts +15 -0
- package/build/swift-ui/modifiers/utils.d.ts.map +1 -0
- package/build/swift-ui/modifiers/utils.js +23 -0
- package/build/swift-ui/modifiers/utils.js.map +1 -0
- package/build/{swift-ui-primitives → swift-ui}/types.d.ts +47 -4
- package/build/swift-ui/types.d.ts.map +1 -0
- package/build/swift-ui/types.js +2 -0
- package/build/swift-ui/types.js.map +1 -0
- package/build/types.d.ts +3 -0
- package/build/types.d.ts.map +1 -1
- package/build/types.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/BottomSheetView.swift +9 -1
- package/ios/Button/Button.swift +1 -0
- package/ios/Button/ButtonProps.swift +7 -2
- package/ios/ColorPickerView.swift +8 -1
- package/ios/ContentUnavailableView.swift +3 -1
- package/ios/ContextMenu/ContextMenu.swift +5 -0
- package/ios/ContextMenu/ContextMenuRecords.swift +19 -3
- package/ios/DateTimePickerView.swift +8 -1
- package/ios/DisclosureGroupView.swift +4 -2
- package/ios/ExpoUIModule.swift +25 -28
- package/ios/FormView.swift +3 -1
- package/ios/Gauge/Gauge.swift +1 -0
- package/ios/Gauge/GaugeProps.swift +7 -1
- package/ios/GroupView.swift +3 -1
- package/ios/HStackView.swift +3 -1
- package/ios/HostView.swift +1 -1
- package/ios/ImageView.swift +3 -1
- package/ios/Label.swift +9 -2
- package/ios/List.swift +8 -2
- package/ios/Modifiers/CommonViewModifiers.swift +6 -3
- package/ios/Modifiers/View+ModifierArray.swift +27 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +718 -0
- package/ios/PickerView.swift +8 -1
- package/ios/ProgressView.swift +8 -1
- package/ios/SectionView.swift +9 -20
- package/ios/SecureField/SecureFieldView.swift +10 -2
- package/ios/ShareLinkView.swift +9 -1
- package/ios/SliderView.swift +8 -1
- package/ios/SpacerView.swift +3 -1
- package/ios/SwitchView.swift +8 -1
- package/ios/TextField/TextFieldView.swift +8 -1
- package/ios/TextView.swift +3 -1
- package/ios/VStackView.swift +3 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module → 0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom → 0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.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/jetpack-compose/AlertDialog/index.tsx +12 -1
- package/src/jetpack-compose/Button/index.tsx +6 -1
- package/src/jetpack-compose/ContextMenu/index.tsx +6 -0
- package/src/jetpack-compose/DatePicker/index.tsx +5 -1
- package/src/jetpack-compose/Picker/index.tsx +10 -0
- package/src/jetpack-compose/Progress/index.tsx +20 -2
- package/src/jetpack-compose/Shape/index.tsx +17 -2
- package/src/jetpack-compose/Slider/index.tsx +6 -1
- package/src/jetpack-compose/Switch/index.tsx +7 -0
- package/src/jetpack-compose/TextInput/index.tsx +6 -1
- package/src/jetpack-compose/{index.tsx → index.ts} +1 -0
- package/src/jetpack-compose/modifiers.ts +19 -0
- package/src/swift-ui/BottomSheet/index.tsx +10 -19
- package/src/swift-ui/Button/index.tsx +11 -20
- package/src/swift-ui/ColorPicker/index.tsx +10 -18
- package/src/{swift-ui-primitives/ContentUnavailableView.tsx → swift-ui/ContentUnavailableView/index.tsx} +16 -9
- package/src/swift-ui/ContextMenu/Submenu.tsx +25 -0
- package/src/swift-ui/ContextMenu/index.tsx +23 -100
- package/src/swift-ui/ContextMenu/types.ts +47 -0
- package/src/swift-ui/ContextMenu/utils.ts +8 -13
- package/src/swift-ui/DatePicker/index.tsx +10 -40
- package/src/{swift-ui-primitives/DisclosureGroup.tsx → swift-ui/DisclosureGroup/index.tsx} +12 -6
- package/src/swift-ui/Form/index.tsx +30 -0
- package/src/swift-ui/Gauge/index.tsx +12 -23
- package/src/swift-ui/Host/index.tsx +7 -2
- package/src/{swift-ui-primitives/Image.tsx → swift-ui/Image/index.tsx} +6 -3
- package/src/swift-ui/Label/index.tsx +10 -15
- package/src/{swift-ui-primitives/Layout.tsx → swift-ui/Layout/index.tsx} +17 -4
- package/src/swift-ui/List/index.tsx +16 -28
- package/src/swift-ui/Picker/index.tsx +10 -22
- package/src/swift-ui/Progress/index.tsx +21 -28
- package/src/swift-ui/Section/index.tsx +11 -16
- package/src/swift-ui/SecureField/index.tsx +10 -22
- package/src/swift-ui/ShareLink/index.tsx +10 -15
- package/src/swift-ui/Slider/index.tsx +10 -18
- package/src/{swift-ui-primitives/Spacer.tsx → swift-ui/Spacer/index.tsx} +12 -2
- package/src/swift-ui/Switch/index.tsx +12 -22
- package/src/{swift-ui-primitives/Text.tsx → swift-ui/Text/index.tsx} +6 -2
- package/src/swift-ui/TextField/index.tsx +9 -21
- package/src/swift-ui/index.tsx +7 -0
- package/src/swift-ui/modifiers/index.ts +374 -0
- package/src/swift-ui/modifiers/utils.ts +33 -0
- package/src/{swift-ui-primitives → swift-ui}/types.ts +48 -4
- package/src/types.ts +4 -0
- package/swift-ui/index.d.ts +1 -0
- package/swift-ui/index.js +1 -0
- package/swift-ui/modifiers.d.ts +1 -0
- package/swift-ui/modifiers.js +1 -0
- package/build/swift-ui-primitives/ContentUnavailableView.d.ts.map +0 -1
- package/build/swift-ui-primitives/ContentUnavailableView.js +0 -15
- package/build/swift-ui-primitives/ContentUnavailableView.js.map +0 -1
- package/build/swift-ui-primitives/DisclosureGroup.d.ts.map +0 -1
- package/build/swift-ui-primitives/DisclosureGroup.js +0 -10
- package/build/swift-ui-primitives/DisclosureGroup.js.map +0 -1
- package/build/swift-ui-primitives/Form.d.ts.map +0 -1
- package/build/swift-ui-primitives/Form.js +0 -6
- package/build/swift-ui-primitives/Form.js.map +0 -1
- package/build/swift-ui-primitives/Image.d.ts.map +0 -1
- package/build/swift-ui-primitives/Image.js.map +0 -1
- package/build/swift-ui-primitives/Layout.d.ts.map +0 -1
- package/build/swift-ui-primitives/Layout.js.map +0 -1
- package/build/swift-ui-primitives/Section.d.ts +0 -6
- package/build/swift-ui-primitives/Section.d.ts.map +0 -1
- package/build/swift-ui-primitives/Section.js +0 -6
- package/build/swift-ui-primitives/Section.js.map +0 -1
- package/build/swift-ui-primitives/Spacer.d.ts.map +0 -1
- package/build/swift-ui-primitives/Spacer.js +0 -6
- package/build/swift-ui-primitives/Spacer.js.map +0 -1
- package/build/swift-ui-primitives/Text.d.ts.map +0 -1
- package/build/swift-ui-primitives/Text.js.map +0 -1
- package/build/swift-ui-primitives/index.d.ts +0 -24
- package/build/swift-ui-primitives/index.d.ts.map +0 -1
- package/build/swift-ui-primitives/index.js +0 -24
- package/build/swift-ui-primitives/index.js.map +0 -1
- package/build/swift-ui-primitives/types.d.ts.map +0 -1
- package/build/swift-ui-primitives/types.js.map +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom.sha512 +0 -1
- package/src/swift-ui-primitives/Form.tsx +0 -20
- package/src/swift-ui-primitives/Section.tsx +0 -15
- package/src/swift-ui-primitives/index.tsx +0 -27
- package/swift-ui-primitives.d.ts +0 -1
- package/swift-ui-primitives.js +0 -1
- package/swift-ui.d.ts +0 -1
- package/swift-ui.js +0 -1
- /package/build/{swift-ui-primitives → swift-ui/ContextMenu}/types.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/swift-ui/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Common frame properties that can be applied to any view.\n */\nexport interface FrameProps {\n /**\n * The width of the frame.\n */\n width?: number;\n /**\n * The height of the frame.\n */\n height?: number;\n\n /**\n * The minimum width of the frame.\n */\n minWidth?: number;\n /**\n * The ideal width of the frame.\n */\n idealWidth?: number;\n /**\n * The maximum width of the frame.\n */\n maxWidth?: number;\n /**\n * The minimum height of the frame.\n */\n minHeight?: number;\n /**\n * The ideal height of the frame.\n */\n idealHeight?: number;\n /**\n * The maximum height of the frame.\n */\n maxHeight?: number;\n\n /**\n * The alignment of the content within the frame.\n */\n alignment?:\n | 'center'\n | 'leading'\n | 'trailing'\n | 'top'\n | 'bottom'\n | 'topLeading'\n | 'topTrailing'\n | 'bottomLeading'\n | 'bottomTrailing';\n}\n\n/**\n * Common padding properties that can be applied to any view.\n */\nexport interface PaddingProps {\n /**\n * The padding on the top.\n */\n top?: number;\n /**\n * The padding on the leading edge (left in LTR, right in RTL).\n */\n leading?: number;\n /**\n * The padding on the bottom.\n */\n bottom?: number;\n /**\n * The padding on the trailing edge (right in LTR, left in RTL).\n */\n trailing?: number;\n}\n\n/**\n * Common props that can be applied to any view.\n */\nexport interface CommonViewModifierProps {\n /**\n * @deprecated Use `fixedSize()` modifier instead. This prop will be removed in a future version.\n * @example\n * ```tsx\n * // Old way (deprecated)\n * <Text fixedSize={true}>Hello</Text>\n *\n * // New way (recommended)\n * <Text modifiers={[fixedSize(true)]}>Hello</Text>\n * ```\n */\n fixedSize?: boolean;\n\n /**\n * @deprecated Use `frame()` modifier instead. This prop will be removed in a future version.\n * @example\n * ```tsx\n * // Old way (deprecated)\n * <Text frame={{ width: 100, height: 50 }}>Hello</Text>\n *\n * // New way (recommended)\n * <Text modifiers={[frame({ width: 100, height: 50 })]}>Hello</Text>\n * ```\n */\n frame?: FrameProps;\n\n /**\n * @deprecated Use `padding()` modifier instead. This prop will be removed in a future version.\n * @example\n * ```tsx\n * // Old way (deprecated)\n * <Text padding={{ all: 16 }}>Hello</Text>\n *\n * // New way (recommended)\n * <Text modifiers={[padding({ all: 16 })]}>Hello</Text>\n * ```\n */\n padding?: PaddingProps;\n\n /**\n * Used to locate this view in end-to-end tests.\n */\n testID?: string;\n\n /**\n * Array of view modifiers to apply to this view.\n * Modifiers are applied in the order they appear in the array.\n *\n * @example\n * ```tsx\n * import { background, cornerRadius, shadow, frame, padding, fixedSize } from 'expo-ui/swift-ui/modifiers';\n *\n * <Text modifiers={[\n * background('#FF0000'),\n * cornerRadius(10),\n * padding({ all: 16 }),\n * frame({ width: 200 }),\n * shadow({ radius: 5, x: 0, y: 2 })\n * ]}>\n * Hello World\n * </Text>\n * ```\n */\n modifiers?: import('./modifiers').ViewModifier[];\n}\n"]}
|
package/build/types.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type { SharedObject } from 'expo';
|
|
1
2
|
/**
|
|
2
3
|
* @hidden
|
|
3
4
|
*/
|
|
4
5
|
export type ViewEvent<Name extends string, Data> = Record<Name, Data extends object ? ((event: {
|
|
5
6
|
nativeEvent: Data;
|
|
6
7
|
}) => void) | undefined : (() => void) | undefined>;
|
|
8
|
+
export declare class ExpoModifier extends SharedObject {
|
|
9
|
+
}
|
|
7
10
|
//# sourceMappingURL=types.d.ts.map
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,MAAM,EAAE,IAAI,IAAI,MAAM,CACvD,IAAI,EACJ,IAAI,SAAS,MAAM,GACf,CAAC,CAAC,KAAK,EAAE;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,KAAK,IAAI,CAAC,GAAG,SAAS,GACpD,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAC7B,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,MAAM,EAAE,IAAI,IAAI,MAAM,CACvD,IAAI,EACJ,IAAI,SAAS,MAAM,GACf,CAAC,CAAC,KAAK,EAAE;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,KAAK,IAAI,CAAC,GAAG,SAAS,GACpD,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAAY;CAAG"}
|
package/build/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @hidden\n */\nexport type ViewEvent<Name extends string, Data> = Record<\n Name,\n Data extends object\n ? ((event: { nativeEvent: Data }) => void) | undefined\n : (() => void) | undefined\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SharedObject } from 'expo';\n\n/**\n * @hidden\n */\nexport type ViewEvent<Name extends string, Data> = Record<\n Name,\n Data extends object\n ? ((event: { nativeEvent: Data }) => void) | undefined\n : (() => void) | undefined\n>;\n\nexport declare class ExpoModifier extends SharedObject {}\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
import SwiftUI
|
|
4
4
|
import ExpoModulesCore
|
|
5
5
|
|
|
6
|
-
final class BottomSheetProps: ExpoSwiftUI.ViewProps {
|
|
6
|
+
final class BottomSheetProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
7
|
+
@Field var fixedSize: Bool?
|
|
8
|
+
@Field var frame: FrameOptions?
|
|
9
|
+
@Field var padding: PaddingOptions?
|
|
10
|
+
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
7
13
|
@Field var isOpened: Bool = false
|
|
8
14
|
var onIsOpenedChange = EventDispatcher()
|
|
9
15
|
}
|
|
@@ -73,6 +79,7 @@ struct BottomSheetView: ExpoSwiftUI.View {
|
|
|
73
79
|
}
|
|
74
80
|
.presentationDetents([.height(self.height)])
|
|
75
81
|
}
|
|
82
|
+
.modifier(CommonViewModifiers(props: props))
|
|
76
83
|
.onChange(of: isOpened, perform: { newIsOpened in
|
|
77
84
|
if props.isOpened == newIsOpened {
|
|
78
85
|
return
|
|
@@ -92,6 +99,7 @@ struct BottomSheetView: ExpoSwiftUI.View {
|
|
|
92
99
|
.sheet(isPresented: $isOpened) {
|
|
93
100
|
Children()
|
|
94
101
|
}
|
|
102
|
+
.modifier(CommonViewModifiers(props: props))
|
|
95
103
|
.onChange(of: isOpened, perform: { newIsOpened in
|
|
96
104
|
if props.isOpened == newIsOpened {
|
|
97
105
|
return
|
package/ios/Button/Button.swift
CHANGED
|
@@ -27,6 +27,7 @@ struct Button: ExpoSwiftUI.View {
|
|
|
27
27
|
})
|
|
28
28
|
.disabled(props.disabled)
|
|
29
29
|
.tint(props.color)
|
|
30
|
+
.modifier(CommonViewModifiers(props: props))
|
|
30
31
|
// TODO: Maybe there is a way to do a switch statement similarly to the `if` extension?
|
|
31
32
|
.if(props.variant == .bordered, {
|
|
32
33
|
$0.buttonStyle(.bordered)
|
|
@@ -34,8 +34,13 @@ internal enum ButtonVariant: String, Enumerable {
|
|
|
34
34
|
case glassProminent
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
final class ButtonProps: ExpoSwiftUI.ViewProps, Observable {
|
|
38
|
-
|
|
37
|
+
final class ButtonProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps, Observable {
|
|
38
|
+
@Field var fixedSize: Bool?
|
|
39
|
+
@Field var frame: FrameOptions?
|
|
40
|
+
@Field var padding: PaddingOptions?
|
|
41
|
+
@Field var testID: String?
|
|
42
|
+
@Field var modifiers: ModifierArray?
|
|
43
|
+
|
|
39
44
|
@Field var text: String?
|
|
40
45
|
@Field var systemImage: String?
|
|
41
46
|
@Field var color: Color?
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
import SwiftUI
|
|
4
4
|
import ExpoModulesCore
|
|
5
5
|
|
|
6
|
-
final class ColorPickerProps: ExpoSwiftUI.ViewProps {
|
|
6
|
+
final class ColorPickerProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
7
|
+
@Field var fixedSize: Bool?
|
|
8
|
+
@Field var frame: FrameOptions?
|
|
9
|
+
@Field var padding: PaddingOptions?
|
|
10
|
+
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
7
13
|
@Field var selection: Color = .clear
|
|
8
14
|
@Field var label: String?
|
|
9
15
|
@Field var supportsOpacity: Bool = true
|
|
@@ -18,6 +24,7 @@ struct ColorPickerView: ExpoSwiftUI.View {
|
|
|
18
24
|
var body: some View {
|
|
19
25
|
#if !os(tvOS)
|
|
20
26
|
ColorPicker(props.label ?? "", selection: $selection, supportsOpacity: props.supportsOpacity)
|
|
27
|
+
.modifier(CommonViewModifiers(props: props))
|
|
21
28
|
.onAppear {
|
|
22
29
|
selection = props.selection
|
|
23
30
|
previousHex = colorToHex(props.selection)
|
|
@@ -7,10 +7,12 @@ internal final class ContentUnavailableViewProps: ExpoSwiftUI.ViewProps, CommonV
|
|
|
7
7
|
@Field var fixedSize: Bool?
|
|
8
8
|
@Field var frame: FrameOptions?
|
|
9
9
|
@Field var padding: PaddingOptions?
|
|
10
|
+
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
10
13
|
@Field var title: String = ""
|
|
11
14
|
@Field var systemImage: String = ""
|
|
12
15
|
@Field var description: String = ""
|
|
13
|
-
@Field var testID: String?
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
struct ContentUnavailableView: ExpoSwiftUI.View {
|
|
@@ -110,6 +110,7 @@ struct ContextMenuPreview: ExpoSwiftUI.View {
|
|
|
110
110
|
|
|
111
111
|
var body: some View {
|
|
112
112
|
Children()
|
|
113
|
+
.modifier(CommonViewModifiers(props: props))
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
|
|
@@ -118,6 +119,7 @@ struct ContextMenuActivationElement: ExpoSwiftUI.View {
|
|
|
118
119
|
|
|
119
120
|
var body: some View {
|
|
120
121
|
Children()
|
|
122
|
+
.modifier(CommonViewModifiers(props: props))
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
125
|
|
|
@@ -134,6 +136,7 @@ struct ContextMenu: ExpoSwiftUI.View {
|
|
|
134
136
|
activationElement: activationElement,
|
|
135
137
|
props: props
|
|
136
138
|
)
|
|
139
|
+
.modifier(CommonViewModifiers(props: props))
|
|
137
140
|
} else {
|
|
138
141
|
let preview = props.children?
|
|
139
142
|
.compactMap { $0.childView as? ContextMenuPreview }
|
|
@@ -148,12 +151,14 @@ struct ContextMenu: ExpoSwiftUI.View {
|
|
|
148
151
|
preview: preview,
|
|
149
152
|
props: props
|
|
150
153
|
)
|
|
154
|
+
.modifier(CommonViewModifiers(props: props))
|
|
151
155
|
} else {
|
|
152
156
|
LongPressContextMenu(
|
|
153
157
|
elements: props.elements,
|
|
154
158
|
activationElement: activationElement,
|
|
155
159
|
props: props
|
|
156
160
|
)
|
|
161
|
+
.modifier(CommonViewModifiers(props: props))
|
|
157
162
|
}
|
|
158
163
|
}
|
|
159
164
|
}
|
|
@@ -20,7 +20,13 @@ internal final class ContextMenuElement: Record, Identifiable {
|
|
|
20
20
|
@Field var contextMenuElementID: String?
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
internal final class ContextMenuProps: ExpoSwiftUI.ViewProps {
|
|
23
|
+
internal final class ContextMenuProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
24
|
+
@Field var fixedSize: Bool?
|
|
25
|
+
@Field var frame: FrameOptions?
|
|
26
|
+
@Field var padding: PaddingOptions?
|
|
27
|
+
@Field var testID: String?
|
|
28
|
+
@Field var modifiers: ModifierArray?
|
|
29
|
+
|
|
24
30
|
@Field var elements: [ContextMenuElement]
|
|
25
31
|
var onContextMenuButtonPressed = EventDispatcher()
|
|
26
32
|
var onContextMenuPickerOptionSelected = EventDispatcher()
|
|
@@ -28,8 +34,18 @@ internal final class ContextMenuProps: ExpoSwiftUI.ViewProps {
|
|
|
28
34
|
@Field var activationMethod: ActivationMethod? = .singlePress
|
|
29
35
|
}
|
|
30
36
|
|
|
31
|
-
internal final class ContextMenuPreviewProps: ExpoSwiftUI.ViewProps {
|
|
37
|
+
internal final class ContextMenuPreviewProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
38
|
+
@Field var fixedSize: Bool?
|
|
39
|
+
@Field var frame: FrameOptions?
|
|
40
|
+
@Field var padding: PaddingOptions?
|
|
41
|
+
@Field var testID: String?
|
|
42
|
+
@Field var modifiers: ModifierArray?
|
|
32
43
|
}
|
|
33
44
|
|
|
34
|
-
internal final class ContextMenuActivationElementProps: ExpoSwiftUI.ViewProps {
|
|
45
|
+
internal final class ContextMenuActivationElementProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
46
|
+
@Field var fixedSize: Bool?
|
|
47
|
+
@Field var frame: FrameOptions?
|
|
48
|
+
@Field var padding: PaddingOptions?
|
|
49
|
+
@Field var testID: String?
|
|
50
|
+
@Field var modifiers: ModifierArray?
|
|
35
51
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import ExpoModulesCore
|
|
2
2
|
import SwiftUI
|
|
3
3
|
|
|
4
|
-
final class DateTimePickerProps: ExpoSwiftUI.ViewProps {
|
|
4
|
+
final class DateTimePickerProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
5
|
+
@Field var fixedSize: Bool?
|
|
6
|
+
@Field var frame: FrameOptions?
|
|
7
|
+
@Field var padding: PaddingOptions?
|
|
8
|
+
@Field var testID: String?
|
|
9
|
+
@Field var modifiers: ModifierArray?
|
|
10
|
+
|
|
5
11
|
@Field var title: String?
|
|
6
12
|
@Field var initialDate: Date?
|
|
7
13
|
@Field var variant: PickerStyle = .automatic
|
|
@@ -25,6 +31,7 @@ struct DateTimePickerView: ExpoSwiftUI.View {
|
|
|
25
31
|
let displayedComponents = props.displayedComponents.toDatePickerComponent()
|
|
26
32
|
|
|
27
33
|
DatePicker(props.title ?? "", selection: $date, displayedComponents: displayedComponents)
|
|
34
|
+
.modifier(CommonViewModifiers(props: props))
|
|
28
35
|
.onAppear {
|
|
29
36
|
date = props.initialDate ?? Date()
|
|
30
37
|
}
|
|
@@ -7,9 +7,11 @@ internal final class DisclosureGroupViewProps: ExpoSwiftUI.ViewProps, CommonView
|
|
|
7
7
|
@Field var fixedSize: Bool?
|
|
8
8
|
@Field var frame: FrameOptions?
|
|
9
9
|
@Field var padding: PaddingOptions?
|
|
10
|
+
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
10
13
|
@Field var label: String
|
|
11
14
|
@Field var isExpanded: Bool = true
|
|
12
|
-
@Field var testID: String?
|
|
13
15
|
var onStateChange = EventDispatcher()
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -24,6 +26,7 @@ internal struct DisclosureGroupView: ExpoSwiftUI.View {
|
|
|
24
26
|
DisclosureGroup(props.label, isExpanded: $isExpanded) {
|
|
25
27
|
Children()
|
|
26
28
|
}
|
|
29
|
+
.modifier(CommonViewModifiers(props: props))
|
|
27
30
|
.onAppear {
|
|
28
31
|
isExpanded = props.isExpanded
|
|
29
32
|
}
|
|
@@ -34,7 +37,6 @@ internal struct DisclosureGroupView: ExpoSwiftUI.View {
|
|
|
34
37
|
.onChange(of: props.isExpanded) { newValue in
|
|
35
38
|
isExpanded = newValue
|
|
36
39
|
}
|
|
37
|
-
.modifier(CommonViewModifiers(props: props))
|
|
38
40
|
#endif
|
|
39
41
|
}
|
|
40
42
|
}
|
package/ios/ExpoUIModule.swift
CHANGED
|
@@ -6,44 +6,41 @@ public final class ExpoUIModule: Module {
|
|
|
6
6
|
public func definition() -> ModuleDefinition {
|
|
7
7
|
Name("ExpoUI")
|
|
8
8
|
|
|
9
|
-
View(Button.self)
|
|
10
|
-
View(PickerView.self)
|
|
11
|
-
View(SwitchView.self)
|
|
12
|
-
View(SectionView.self)
|
|
13
9
|
View(BottomSheetView.self)
|
|
14
|
-
View(
|
|
10
|
+
View(Button.self)
|
|
11
|
+
View(ColorPickerView.self)
|
|
12
|
+
View(DateTimePickerView.self)
|
|
13
|
+
View(DisclosureGroupView.self)
|
|
14
|
+
View(ExpoUI.ContentUnavailableView.self)
|
|
15
15
|
View(ExpoUI.ContextMenu.self)
|
|
16
16
|
View(ExpoUI.ContextMenuActivationElement.self)
|
|
17
17
|
View(ExpoUI.ContextMenuPreview.self)
|
|
18
|
-
View(
|
|
19
|
-
View(
|
|
20
|
-
View(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
View(FormView.self)
|
|
19
|
+
View(GaugeView.self)
|
|
20
|
+
View(GroupView.self)
|
|
21
|
+
View(HStackView.self)
|
|
22
|
+
View(HostView.self)
|
|
23
|
+
View(ImageView.self)
|
|
24
|
+
View(LabelView.self)
|
|
25
|
+
View(ListView.self)
|
|
26
|
+
View(PickerView.self)
|
|
27
|
+
View(ProgressView.self)
|
|
28
|
+
View(SectionView.self)
|
|
25
29
|
View(SecureFieldView.self) {
|
|
26
30
|
AsyncFunction("setText") { (view: SecureFieldView, text: String) in
|
|
27
31
|
view.setText(text)
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
|
-
View(ProgressView.self)
|
|
31
|
-
View(GaugeView.self)
|
|
32
|
-
View(ListView.self)
|
|
33
|
-
View(LabelView.self)
|
|
34
34
|
View(ShareLinkView.self)
|
|
35
|
-
View(
|
|
36
|
-
|
|
37
|
-
// Preview components in the "primitives" exports
|
|
38
|
-
View(FormView.self)
|
|
39
|
-
View(HStackView.self)
|
|
40
|
-
View(VStackView.self)
|
|
41
|
-
View(SectionPrimitiveView.self)
|
|
42
|
-
View(TextView.self)
|
|
43
|
-
View(ImageView.self)
|
|
35
|
+
View(SliderView.self)
|
|
44
36
|
View(SpacerView.self)
|
|
45
|
-
View(
|
|
46
|
-
View(
|
|
47
|
-
View(
|
|
37
|
+
View(SwitchView.self)
|
|
38
|
+
View(TextView.self)
|
|
39
|
+
View(TextFieldView.self) {
|
|
40
|
+
AsyncFunction("setText") { (view: TextFieldView, text: String) in
|
|
41
|
+
view.setText(text)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
View(VStackView.self)
|
|
48
45
|
}
|
|
49
46
|
}
|
package/ios/FormView.swift
CHANGED
|
@@ -7,8 +7,10 @@ internal final class FormViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierPro
|
|
|
7
7
|
@Field var fixedSize: Bool?
|
|
8
8
|
@Field var frame: FrameOptions?
|
|
9
9
|
@Field var padding: PaddingOptions?
|
|
10
|
-
@Field var scrollEnabled: Bool = true
|
|
11
10
|
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
13
|
+
@Field var scrollEnabled: Bool = true
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
internal struct FormView: ExpoSwiftUI.View {
|
package/ios/Gauge/Gauge.swift
CHANGED
|
@@ -21,6 +21,7 @@ struct GaugeView: ExpoSwiftUI.View {
|
|
|
21
21
|
} maximumValueLabel: {
|
|
22
22
|
optionalLabelFor(props.max)
|
|
23
23
|
}
|
|
24
|
+
.modifier(CommonViewModifiers(props: props))
|
|
24
25
|
.if(props.type == .default) { $0.gaugeStyle(.automatic) }
|
|
25
26
|
.if(props.type == .circular) { $0.gaugeStyle(.accessoryCircular) }
|
|
26
27
|
.if(props.type == .circularCapacity) { $0.gaugeStyle(.accessoryCircularCapacity) }
|
|
@@ -17,7 +17,13 @@ internal enum GaugeStyle: String, Enumerable {
|
|
|
17
17
|
case linearCapacity
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
final class GaugeProps: ExpoSwiftUI.ViewProps {
|
|
20
|
+
final class GaugeProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
21
|
+
@Field var fixedSize: Bool?
|
|
22
|
+
@Field var frame: FrameOptions?
|
|
23
|
+
@Field var padding: PaddingOptions?
|
|
24
|
+
@Field var testID: String?
|
|
25
|
+
@Field var modifiers: ModifierArray?
|
|
26
|
+
|
|
21
27
|
@Field var label: String?
|
|
22
28
|
@Field var labelColor: Color?
|
|
23
29
|
@Field var current: ValueOptions
|
package/ios/GroupView.swift
CHANGED
|
@@ -7,8 +7,10 @@ internal final class GroupViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierPr
|
|
|
7
7
|
@Field var fixedSize: Bool?
|
|
8
8
|
@Field var frame: FrameOptions?
|
|
9
9
|
@Field var padding: PaddingOptions?
|
|
10
|
-
@Field var useTapGesture: Bool?
|
|
11
10
|
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
13
|
+
@Field var useTapGesture: Bool?
|
|
12
14
|
var onTap = EventDispatcher()
|
|
13
15
|
}
|
|
14
16
|
|
package/ios/HStackView.swift
CHANGED
|
@@ -30,11 +30,13 @@ internal final class HStackViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierP
|
|
|
30
30
|
@Field var fixedSize: Bool?
|
|
31
31
|
@Field var frame: FrameOptions?
|
|
32
32
|
@Field var padding: PaddingOptions?
|
|
33
|
+
@Field var testID: String?
|
|
34
|
+
@Field var modifiers: ModifierArray?
|
|
35
|
+
|
|
33
36
|
@Field var spacing: Double?
|
|
34
37
|
@Field var useTapGesture: Bool?
|
|
35
38
|
@Field var alignment: VerticalAlignmentOptions?
|
|
36
39
|
@Field var backgroundColor: Color?
|
|
37
|
-
@Field var testID: String?
|
|
38
40
|
var onTap = EventDispatcher()
|
|
39
41
|
}
|
|
40
42
|
|
package/ios/HostView.swift
CHANGED
|
@@ -23,7 +23,7 @@ internal final class HostViewProps: ExpoSwiftUI.ViewProps {
|
|
|
23
23
|
var onLayoutContent = EventDispatcher()
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
struct HostView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
27
27
|
@ObservedObject var props: HostViewProps
|
|
28
28
|
|
|
29
29
|
var body: some View {
|
package/ios/ImageView.swift
CHANGED
|
@@ -7,11 +7,13 @@ internal final class ImageViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierPr
|
|
|
7
7
|
@Field var fixedSize: Bool?
|
|
8
8
|
@Field var frame: FrameOptions?
|
|
9
9
|
@Field var padding: PaddingOptions?
|
|
10
|
+
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
10
13
|
@Field var systemName: String = ""
|
|
11
14
|
@Field var size: Double?
|
|
12
15
|
@Field var color: Color?
|
|
13
16
|
@Field var useTapGesture: Bool?
|
|
14
|
-
@Field var testID: String?
|
|
15
17
|
var onTap = EventDispatcher()
|
|
16
18
|
}
|
|
17
19
|
|
package/ios/Label.swift
CHANGED
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
import ExpoModulesCore
|
|
4
4
|
import SwiftUI
|
|
5
5
|
|
|
6
|
-
final class LabelViewProps: ExpoSwiftUI.ViewProps {
|
|
6
|
+
final class LabelViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
7
|
+
@Field var fixedSize: Bool?
|
|
8
|
+
@Field var frame: FrameOptions?
|
|
9
|
+
@Field var padding: PaddingOptions?
|
|
10
|
+
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
7
13
|
@Field var title: String?
|
|
8
14
|
@Field var systemImage: String?
|
|
9
15
|
@Field var color: Color?
|
|
@@ -17,6 +23,7 @@ struct LabelView: ExpoSwiftUI.View {
|
|
|
17
23
|
title: { Text(props.title ?? "") },
|
|
18
24
|
icon: { Image(systemName: props.systemImage ?? "").foregroundStyle(props.color ?? Color.accentColor) }
|
|
19
25
|
)
|
|
20
|
-
.
|
|
26
|
+
.modifier(CommonViewModifiers(props: props))
|
|
27
|
+
.applyFixedSize(props.fixedSize ?? true)
|
|
21
28
|
}
|
|
22
29
|
}
|
package/ios/List.swift
CHANGED
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
import ExpoModulesCore
|
|
4
4
|
import SwiftUI
|
|
5
5
|
|
|
6
|
-
final class ListProps: ExpoSwiftUI.ViewProps {
|
|
6
|
+
final class ListProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
|
|
7
|
+
@Field var fixedSize: Bool?
|
|
8
|
+
@Field var frame: FrameOptions?
|
|
9
|
+
@Field var padding: PaddingOptions?
|
|
10
|
+
@Field var testID: String?
|
|
11
|
+
@Field var modifiers: ModifierArray?
|
|
12
|
+
|
|
7
13
|
@Field var listStyle: String = "automatic"
|
|
8
14
|
@Field var moveEnabled: Bool = false
|
|
9
15
|
@Field var deleteEnabled: Bool = false
|
|
@@ -34,6 +40,7 @@ struct ListView: ExpoSwiftUI.View {
|
|
|
34
40
|
.moveDisabled(!props.moveEnabled)
|
|
35
41
|
}
|
|
36
42
|
.modifier(ListStyleModifer(style: props.listStyle))
|
|
43
|
+
.modifier(CommonViewModifiers(props: props))
|
|
37
44
|
.onAppear {
|
|
38
45
|
editModeEnabled = props.editModeEnabled ? .active : .inactive
|
|
39
46
|
}
|
|
@@ -43,7 +50,6 @@ struct ListView: ExpoSwiftUI.View {
|
|
|
43
50
|
}
|
|
44
51
|
}
|
|
45
52
|
.onChange(of: selection) { selection in
|
|
46
|
-
print(selection)
|
|
47
53
|
handleSelectionChange(selection: selection)
|
|
48
54
|
}
|
|
49
55
|
.modifier(ScrollDisabledModifier(scrollEnabled: props.scrollEnabled))
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
import ExpoModulesCore
|
|
4
4
|
import SwiftUI
|
|
5
5
|
|
|
6
|
-
internal protocol CommonViewModifierProps {
|
|
6
|
+
internal protocol CommonViewModifierProps: ObservableObject {
|
|
7
7
|
var fixedSize: Bool? { get }
|
|
8
8
|
var frame: FrameOptions? { get }
|
|
9
9
|
var padding: PaddingOptions? { get }
|
|
10
10
|
var testID: String? { get }
|
|
11
|
+
var modifiers: ModifierArray? { get }
|
|
12
|
+
var globalEventDispatcher: EventDispatcher { get }
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
internal struct CommonViewModifiers: ViewModifier {
|
|
14
|
-
|
|
15
|
+
internal struct CommonViewModifiers<Props: CommonViewModifierProps>: ViewModifier {
|
|
16
|
+
@ObservedObject var props: Props
|
|
15
17
|
var defaultFrameAlignment = Alignment.center
|
|
16
18
|
|
|
17
19
|
func body(content: Content) -> some View {
|
|
@@ -20,5 +22,6 @@ internal struct CommonViewModifiers: ViewModifier {
|
|
|
20
22
|
.applyFrame(props.frame, defaultAlignment: defaultFrameAlignment)
|
|
21
23
|
.applyPadding(props.padding)
|
|
22
24
|
.applyAccessibilityIdentifier(props.testID)
|
|
25
|
+
.applyModifiers(props.modifiers, globalEventDispatcher: props.globalEventDispatcher)
|
|
23
26
|
}
|
|
24
27
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2015-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesCore
|
|
4
|
+
import SwiftUI
|
|
5
|
+
|
|
6
|
+
internal typealias ModifierType = [String: Any]
|
|
7
|
+
internal typealias ModifierArray = [ModifierType]
|
|
8
|
+
|
|
9
|
+
internal extension View {
|
|
10
|
+
/**
|
|
11
|
+
* Applies an array of modifiers to a view using the ViewModifierRegistry.
|
|
12
|
+
*/
|
|
13
|
+
@ViewBuilder
|
|
14
|
+
func applyModifiers(_ modifiers: ModifierArray?, globalEventDispatcher: EventDispatcher) -> some View {
|
|
15
|
+
if let modifiers = modifiers {
|
|
16
|
+
modifiers.reduce(AnyView(self)) { currentView, modifierConfig in
|
|
17
|
+
guard let type = modifierConfig["$type"] as? String else {
|
|
18
|
+
return currentView
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return ViewModifierRegistry.shared.applyModifier(type, to: currentView, globalEventDispatcher: globalEventDispatcher, params: modifierConfig)
|
|
22
|
+
}
|
|
23
|
+
} else {
|
|
24
|
+
self
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|