@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/Label/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/Label/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAoBrE,MAAM,eAAe,GAAoC,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AAElG;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CAAC,KAAiB;IACrC,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAC1C,OAAO,CACL,CAAC,eAAe,CACd,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CACzE,IAAI,SAAS,CAAC,EACd,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\n\nimport { createViewModifierEventListener } from '../modifiers/utils';\nimport { type CommonViewModifierProps } from '../types';\n\nexport type LabelProps = {\n /**\n * The title text to be displayed in the label.\n */\n title?: string;\n\n /**\n * The name of the SFSymbol to be displayed in the label.\n */\n systemImage?: string;\n\n /**\n * The color of the label icon.\n */\n color?: string;\n} & CommonViewModifierProps;\n\nconst LabelNativeView: React.ComponentType<LabelProps> = requireNativeView('ExpoUI', 'LabelView');\n\n/**\n * Renders a native label view, which could be used in a list or section.\n *\n * @param {LabelProps} props - The properties passed to the Label component.\n * @returns {JSX.Element} The rendered native Label component.\n * @platform ios\n */\nexport function Label(props: LabelProps) {\n const { modifiers, ...restProps } = props;\n return (\n <LabelNativeView\n modifiers={modifiers}\n {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}\n {...restProps}\n />\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type ViewEvent } from '../../types';
|
|
2
|
+
import { type CommonViewModifierProps } from '../types';
|
|
3
3
|
type TapEvent = ViewEvent<'onTap', object> & {
|
|
4
4
|
useTapGesture?: boolean;
|
|
5
5
|
};
|
|
@@ -30,4 +30,4 @@ export interface GroupProps extends CommonViewModifierProps {
|
|
|
30
30
|
}
|
|
31
31
|
export declare function Group(props: GroupProps): import("react").JSX.Element;
|
|
32
32
|
export {};
|
|
33
|
-
//# sourceMappingURL=
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Layout/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,KAAK,QAAQ,GAAG,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,UAAU,cAAe,SAAQ,uBAAuB;IACtD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AACD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC;AAa1E,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;CACpF;AAOD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC;AAID,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;CAC/C;AAOD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC;AAID,MAAM,WAAW,UAAW,SAAQ,uBAAuB;IACzD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAkBD,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,+BAEtC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
2
3
|
function transformNativeProps(props) {
|
|
3
|
-
const { onPress, ...restProps } = props;
|
|
4
|
+
const { onPress, modifiers, ...restProps } = props;
|
|
4
5
|
return {
|
|
6
|
+
modifiers,
|
|
7
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
5
8
|
...restProps,
|
|
6
9
|
...(onPress ? { useTapGesture: true, onTap: () => onPress() } : null),
|
|
7
10
|
};
|
|
@@ -15,8 +18,17 @@ export function VStack(props) {
|
|
|
15
18
|
return <VStackNativeView {...transformNativeProps(props)}/>;
|
|
16
19
|
}
|
|
17
20
|
const GroupNativeView = requireNativeView('ExpoUI', 'GroupView');
|
|
21
|
+
function transformGroupProps(props) {
|
|
22
|
+
const { onPress, modifiers, ...restProps } = props;
|
|
23
|
+
return {
|
|
24
|
+
modifiers,
|
|
25
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
26
|
+
...restProps,
|
|
27
|
+
...(onPress ? { useTapGesture: true, onTap: () => onPress() } : null),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
18
30
|
export function Group(props) {
|
|
19
|
-
return <GroupNativeView {...
|
|
31
|
+
return <GroupNativeView {...transformGroupProps(props)}/>;
|
|
20
32
|
}
|
|
21
33
|
//#endregion
|
|
22
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/Layout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAmBrE,SAAS,oBAAoB,CAAC,KAAqB;IACjD,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IACnD,OAAO;QACL,SAAS;QACT,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvE,GAAG,SAAS;QACZ,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KACtE,CAAC;AACJ,CAAC;AAOD,MAAM,gBAAgB,GAA0C,iBAAiB,CAC/E,QAAQ,EACR,YAAY,CACb,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,KAAkB;IACvC,OAAO,CAAC,gBAAgB,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAG,CAAC;AAC/D,CAAC;AAQD,MAAM,gBAAgB,GAA0C,iBAAiB,CAC/E,QAAQ,EACR,YAAY,CACb,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,KAAkB;IACvC,OAAO,CAAC,gBAAgB,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAG,CAAC;AAC/D,CAAC;AAcD,MAAM,eAAe,GAA0C,iBAAiB,CAC9E,QAAQ,EACR,WAAW,CACZ,CAAC;AAEF,SAAS,mBAAmB,CAAC,KAAiB;IAC5C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IACnD,OAAO;QACL,SAAS;QACT,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvE,GAAG,SAAS;QACZ,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KACtE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,KAAiB;IACrC,OAAO,CAAC,eAAe,CAAC,IAAI,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAAG,CAAC;AAC7D,CAAC;AACD,YAAY","sourcesContent":["import { requireNativeView } from 'expo';\n\nimport { type ViewEvent } from '../../types';\nimport { createViewModifierEventListener } from '../modifiers/utils';\nimport { type CommonViewModifierProps } from '../types';\n\ntype TapEvent = ViewEvent<'onTap', object> & {\n useTapGesture?: boolean;\n};\n\ninterface StackBaseProps extends CommonViewModifierProps {\n children: React.ReactNode;\n spacing?: number;\n backgroundColor?: string;\n\n /**\n * Callback triggered when the view is pressed.\n */\n onPress?: () => void;\n}\nexport type NativeStackProps = Omit<StackBaseProps, 'onPress'> | TapEvent;\n\nfunction transformNativeProps(props: StackBaseProps): NativeStackProps {\n const { onPress, modifiers, ...restProps } = props;\n return {\n modifiers,\n ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),\n ...restProps,\n ...(onPress ? { useTapGesture: true, onTap: () => onPress() } : null),\n };\n}\n\n//#region HStack Component\nexport interface HStackProps extends StackBaseProps {\n alignment?: 'top' | 'center' | 'bottom' | 'firstTextBaseline' | 'lastTextBaseline';\n}\n\nconst HStackNativeView: React.ComponentType<NativeStackProps> = requireNativeView(\n 'ExpoUI',\n 'HStackView'\n);\n\nexport function HStack(props: HStackProps) {\n return <HStackNativeView {...transformNativeProps(props)} />;\n}\n//#endregion\n\n//#region VStack Component\nexport interface VStackProps extends StackBaseProps {\n alignment?: 'leading' | 'center' | 'trailing';\n}\n\nconst VStackNativeView: React.ComponentType<NativeStackProps> = requireNativeView(\n 'ExpoUI',\n 'VStackView'\n);\n\nexport function VStack(props: VStackProps) {\n return <VStackNativeView {...transformNativeProps(props)} />;\n}\n//#endregion\n\n//#region Group Component\nexport interface GroupProps extends CommonViewModifierProps {\n children: React.ReactNode;\n\n /**\n * Callback triggered when the view is pressed.\n */\n onPress?: () => void;\n}\n\ntype NativeGroupProps = Omit<GroupProps, 'onPress'> | TapEvent;\nconst GroupNativeView: React.ComponentType<NativeGroupProps> = requireNativeView(\n 'ExpoUI',\n 'GroupView'\n);\n\nfunction transformGroupProps(props: GroupProps): NativeGroupProps {\n const { onPress, modifiers, ...restProps } = props;\n return {\n modifiers,\n ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),\n ...restProps,\n ...(onPress ? { useTapGesture: true, onTap: () => onPress() } : null),\n };\n}\n\nexport function Group(props: GroupProps) {\n return <GroupNativeView {...transformGroupProps(props)} />;\n}\n//#endregion\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ViewEvent } from '../../types';
|
|
1
|
+
import { type CommonViewModifierProps } from '../types';
|
|
3
2
|
export type ListStyle = 'automatic' | 'plain' | 'inset' | 'insetGrouped' | 'grouped' | 'sidebar';
|
|
4
|
-
export interface ListProps {
|
|
3
|
+
export interface ListProps extends CommonViewModifierProps {
|
|
5
4
|
/**
|
|
6
5
|
* One of the predefined ListStyle types in SwiftUI.
|
|
7
6
|
* @default 'automatic'
|
|
@@ -50,41 +49,11 @@ export interface ListProps {
|
|
|
50
49
|
*/
|
|
51
50
|
onSelectionChange?: (selection: number[]) => void;
|
|
52
51
|
}
|
|
53
|
-
/**
|
|
54
|
-
* DeleteItemEvent represents an event triggered when an item is deleted from the list.
|
|
55
|
-
*/
|
|
56
|
-
type DeleteItemEvent = ViewEvent<'onDeleteItem', {
|
|
57
|
-
index: number;
|
|
58
|
-
}>;
|
|
59
|
-
/**
|
|
60
|
-
* MoveItemEvent represents an event triggered when an item is moved in the list.
|
|
61
|
-
*/
|
|
62
|
-
type MoveItemEvent = ViewEvent<'onMoveItem', {
|
|
63
|
-
from: number;
|
|
64
|
-
to: number;
|
|
65
|
-
}>;
|
|
66
|
-
/**
|
|
67
|
-
* SelectItemEvent represents an event triggered when the selection changes in a list.
|
|
68
|
-
*/
|
|
69
|
-
type SelectItemEvent = ViewEvent<'onSelectionChange', {
|
|
70
|
-
selection: number[];
|
|
71
|
-
}>;
|
|
72
|
-
export type NativeListProps = Omit<ListProps, 'onDeleteItem' | 'onMoveItem' | 'onSelectionChange'> & DeleteItemEvent & MoveItemEvent & SelectItemEvent & {
|
|
73
|
-
children: React.ReactNode;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* `<List>` component without a host view.
|
|
77
|
-
* You should use this with a `Host` component in ancestor.
|
|
78
|
-
*/
|
|
79
|
-
export declare function ListPrimitive(props: ListProps): import("react").JSX.Element | null;
|
|
80
52
|
/**
|
|
81
53
|
* A list component that renders its children using a native SwiftUI list.
|
|
82
54
|
* @param {ListProps} props - The properties for the list component.
|
|
83
55
|
* @returns {JSX.Element | null} The rendered list with its children or null if the platform is unsupported.
|
|
84
56
|
* @platform ios
|
|
85
57
|
*/
|
|
86
|
-
export declare function List(props: ListProps
|
|
87
|
-
style?: StyleProp<ViewStyle>;
|
|
88
|
-
}): import("react").JSX.Element;
|
|
89
|
-
export {};
|
|
58
|
+
export declare function List(props: ListProps): import("react").JSX.Element;
|
|
90
59
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/List/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/List/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAmBxD,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjG,MAAM,WAAW,SAAU,SAAQ,uBAAuB;IACxD;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACnD;AAsBD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,+BAGpC"}
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
-
import {
|
|
2
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
3
3
|
const ListNativeView = requireNativeView('ExpoUI', 'ListView');
|
|
4
4
|
function transformListProps(props) {
|
|
5
|
+
const { modifiers, ...restProps } = props;
|
|
5
6
|
return {
|
|
6
|
-
|
|
7
|
+
modifiers,
|
|
8
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
9
|
+
...restProps,
|
|
7
10
|
onDeleteItem: ({ nativeEvent: { index } }) => props?.onDeleteItem?.(index),
|
|
8
11
|
onMoveItem: ({ nativeEvent: { from, to } }) => props?.onMoveItem?.(from, to),
|
|
9
12
|
onSelectionChange: ({ nativeEvent: { selection } }) => props?.onSelectionChange?.(selection),
|
|
10
13
|
};
|
|
11
14
|
}
|
|
12
|
-
/**
|
|
13
|
-
* `<List>` component without a host view.
|
|
14
|
-
* You should use this with a `Host` component in ancestor.
|
|
15
|
-
*/
|
|
16
|
-
export function ListPrimitive(props) {
|
|
17
|
-
const { children, ...nativeProps } = props;
|
|
18
|
-
if (!ListNativeView) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
return <ListNativeView {...transformListProps(nativeProps)}>{children}</ListNativeView>;
|
|
22
|
-
}
|
|
23
15
|
/**
|
|
24
16
|
* A list component that renders its children using a native SwiftUI list.
|
|
25
17
|
* @param {ListProps} props - The properties for the list component.
|
|
@@ -27,8 +19,7 @@ export function ListPrimitive(props) {
|
|
|
27
19
|
* @platform ios
|
|
28
20
|
*/
|
|
29
21
|
export function List(props) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</Host>);
|
|
22
|
+
const { children, ...nativeProps } = props;
|
|
23
|
+
return <ListNativeView {...transformListProps(nativeProps)}>{children}</ListNativeView>;
|
|
33
24
|
}
|
|
34
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/List/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/List/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAGrE,MAAM,cAAc,GAAyC,iBAAiB,CAC5E,QAAQ,EACR,UAAU,CACX,CAAC;AAEF,SAAS,kBAAkB,CAAC,KAAkC;IAC5D,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAC1C,OAAO;QACL,SAAS;QACT,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvE,GAAG,SAAS;QACZ,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,KAAK,CAAC;QAC1E,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5E,iBAAiB,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,CAAC,SAAS,CAAC;KAC7F,CAAC;AACJ,CAAC;AAmFD;;;;;GAKG;AACH,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,GAAG,KAAK,CAAC;IAC3C,OAAO,CAAC,cAAc,CAAC,IAAI,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\n\nimport { type ViewEvent } from '../../types';\nimport { createViewModifierEventListener } from '../modifiers/utils';\nimport { type CommonViewModifierProps } from '../types';\n\nconst ListNativeView: React.ComponentType<NativeListProps> = requireNativeView<NativeListProps>(\n 'ExpoUI',\n 'ListView'\n);\n\nfunction transformListProps(props: Omit<ListProps, 'children'>): Omit<NativeListProps, 'children'> {\n const { modifiers, ...restProps } = props;\n return {\n modifiers,\n ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),\n ...restProps,\n onDeleteItem: ({ nativeEvent: { index } }) => props?.onDeleteItem?.(index),\n onMoveItem: ({ nativeEvent: { from, to } }) => props?.onMoveItem?.(from, to),\n onSelectionChange: ({ nativeEvent: { selection } }) => props?.onSelectionChange?.(selection),\n };\n}\n\nexport type ListStyle = 'automatic' | 'plain' | 'inset' | 'insetGrouped' | 'grouped' | 'sidebar';\n\nexport interface ListProps extends CommonViewModifierProps {\n /**\n * One of the predefined ListStyle types in SwiftUI.\n * @default 'automatic'\n */\n listStyle?: ListStyle;\n\n /**\n * Allows the selection of list items.\n * @default false\n */\n selectEnabled?: boolean;\n\n /**\n * Enables reordering of list items.\n * @default false\n */\n moveEnabled?: boolean;\n\n /**\n * Allows the deletion of list items.\n * @default false\n */\n deleteEnabled?: boolean;\n\n /**\n * Makes the list scrollable.\n * @default true\n * @platform ios 16.0+\n */\n scrollEnabled?: boolean;\n\n /**\n * Enables SwiftUI edit mode.\n * @default false\n */\n editModeEnabled?: boolean;\n\n /**\n * The children elements to be rendered inside the list.\n */\n children: React.ReactNode;\n\n /**\n * Callback triggered when an item is deleted from the list.\n */\n onDeleteItem?: (index: number) => void;\n\n /**\n * Callback triggered when an item is moved in the list.\n */\n onMoveItem?: (from: number, to: number) => void;\n\n /**\n * Callback triggered when the selection changes in a list.\n */\n onSelectionChange?: (selection: number[]) => void;\n}\n\n/**\n * DeleteItemEvent represents an event triggered when an item is deleted from the list.\n */\ntype DeleteItemEvent = ViewEvent<'onDeleteItem', { index: number }>;\n/**\n * MoveItemEvent represents an event triggered when an item is moved in the list.\n */\ntype MoveItemEvent = ViewEvent<'onMoveItem', { from: number; to: number }>;\n/**\n * SelectItemEvent represents an event triggered when the selection changes in a list.\n */\ntype SelectItemEvent = ViewEvent<'onSelectionChange', { selection: number[] }>;\n\ntype NativeListProps = Omit<ListProps, 'onDeleteItem' | 'onMoveItem' | 'onSelectionChange'> &\n DeleteItemEvent &\n MoveItemEvent &\n SelectItemEvent & {\n children: React.ReactNode;\n };\n\n/**\n * A list component that renders its children using a native SwiftUI list.\n * @param {ListProps} props - The properties for the list component.\n * @returns {JSX.Element | null} The rendered list with its children or null if the platform is unsupported.\n * @platform ios\n */\nexport function List(props: ListProps) {\n const { children, ...nativeProps } = props;\n return <ListNativeView {...transformListProps(nativeProps)}>{children}</ListNativeView>;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type CommonViewModifierProps } from '../types';
|
|
2
2
|
export type PickerProps = {
|
|
3
3
|
/**
|
|
4
4
|
* An array of options to be displayed in the picker.
|
|
@@ -31,22 +31,9 @@ export type PickerProps = {
|
|
|
31
31
|
* Picker color. On iOS it only applies to the `'menu'` variant.
|
|
32
32
|
*/
|
|
33
33
|
color?: string;
|
|
34
|
-
};
|
|
35
|
-
type NativePickerProps = PickerProps;
|
|
36
|
-
/**
|
|
37
|
-
* @hidden
|
|
38
|
-
*/
|
|
39
|
-
export declare function transformPickerProps(props: PickerProps): NativePickerProps;
|
|
40
|
-
/**
|
|
41
|
-
* `<Picker>` component without a host view.
|
|
42
|
-
* You should use this with a `Host` component in ancestor.
|
|
43
|
-
*/
|
|
44
|
-
export declare function PickerPrimitive(props: PickerProps): import("react").JSX.Element;
|
|
34
|
+
} & CommonViewModifierProps;
|
|
45
35
|
/**
|
|
46
36
|
* 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.
|
|
47
37
|
*/
|
|
48
|
-
export declare function Picker(props: PickerProps
|
|
49
|
-
style?: StyleProp<ViewStyle>;
|
|
50
|
-
}): import("react").JSX.Element;
|
|
51
|
-
export {};
|
|
38
|
+
export declare function Picker(props: PickerProps): import("react").JSX.Element;
|
|
52
39
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Picker/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Picker/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IACtF;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,uBAAuB,CAAC;AAoB5B;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
-
import {
|
|
2
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
3
3
|
const PickerNativeView = requireNativeView('ExpoUI', 'PickerView');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
export function transformPickerProps(props) {
|
|
4
|
+
function transformPickerProps(props) {
|
|
5
|
+
const { modifiers, ...restProps } = props;
|
|
8
6
|
return {
|
|
9
|
-
|
|
7
|
+
modifiers,
|
|
8
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
9
|
+
...restProps,
|
|
10
10
|
variant: props.variant ?? 'segmented',
|
|
11
11
|
color: props.color,
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
15
|
-
* `<Picker>` component without a host view.
|
|
16
|
-
* You should use this with a `Host` component in ancestor.
|
|
17
|
-
*/
|
|
18
|
-
export function PickerPrimitive(props) {
|
|
19
|
-
return <PickerNativeView {...transformPickerProps(props)}/>;
|
|
20
|
-
}
|
|
21
14
|
/**
|
|
22
15
|
* 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.
|
|
23
16
|
*/
|
|
24
17
|
export function Picker(props) {
|
|
25
|
-
return
|
|
26
|
-
<PickerPrimitive {...props}/>
|
|
27
|
-
</Host>);
|
|
18
|
+
return <PickerNativeView {...transformPickerProps(props)}/>;
|
|
28
19
|
}
|
|
29
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/Picker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/Picker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAgCrE,MAAM,gBAAgB,GAAqC,iBAAiB,CAC1E,QAAQ,EACR,YAAY,CACb,CAAC;AAIF,SAAS,oBAAoB,CAAC,KAAkB;IAC9C,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAC1C,OAAO;QACL,SAAS;QACT,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvE,GAAG,SAAS;QACZ,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,WAAW;QACrC,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAkB;IACvC,OAAO,CAAC,gBAAgB,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAAG,CAAC;AAC/D,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\n\nimport { createViewModifierEventListener } from '../modifiers/utils';\nimport { type CommonViewModifierProps } from '../types';\n\nexport type PickerProps = {\n /**\n * An array of options to be displayed in the picker.\n */\n options: string[];\n /**\n * The index of the currently selected option.\n */\n selectedIndex: number | null;\n /**\n * A label displayed on the picker when in `'menu'` variant inside a form section on iOS.\n */\n label?: string;\n /**\n * Callback function that is called when an option is selected.\n */\n onOptionSelected?: (event: { nativeEvent: { index: number; label: string } }) => void;\n /**\n * The variant of the picker, which determines its appearance and behavior.\n * The `'wheel'`, `'inline'`, `'palette'` and `'menu'` variants are iOS only, the `'radio'` variant is Android only. The `'inline'` variant can only be used inside sections or lists. The `'palette'` variant displays differently inside menus.\n * @default 'segmented'\n */\n variant?: 'wheel' | 'segmented' | 'menu' | 'inline' | 'palette';\n /**\n * Picker color. On iOS it only applies to the `'menu'` variant.\n */\n color?: string;\n} & CommonViewModifierProps;\n\nconst PickerNativeView: React.ComponentType<PickerProps> = requireNativeView(\n 'ExpoUI',\n 'PickerView'\n);\n\ntype NativePickerProps = PickerProps;\n\nfunction transformPickerProps(props: PickerProps): NativePickerProps {\n const { modifiers, ...restProps } = props;\n return {\n modifiers,\n ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),\n ...restProps,\n variant: props.variant ?? 'segmented',\n color: props.color,\n };\n}\n\n/**\n * 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.\n */\nexport function Picker(props: PickerProps) {\n return <PickerNativeView {...transformPickerProps(props)} />;\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ColorValue
|
|
1
|
+
import { ColorValue } from 'react-native';
|
|
2
|
+
import { type CommonViewModifierProps } from '../types';
|
|
2
3
|
export type CircularProgressProps = {
|
|
3
4
|
/**
|
|
4
5
|
* The current progress value of the slider. This is a number between `0` and `1`.
|
|
@@ -8,7 +9,7 @@ export type CircularProgressProps = {
|
|
|
8
9
|
* Progress color.
|
|
9
10
|
*/
|
|
10
11
|
color?: ColorValue;
|
|
11
|
-
};
|
|
12
|
+
} & CommonViewModifierProps;
|
|
12
13
|
export type LinearProgressProps = {
|
|
13
14
|
/**
|
|
14
15
|
* The current progress value of the slider. This is a number between `0` and `1`.
|
|
@@ -18,27 +19,13 @@ export type LinearProgressProps = {
|
|
|
18
19
|
* Progress color.
|
|
19
20
|
*/
|
|
20
21
|
color?: ColorValue;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* `<CircularProgress>` component without a host view.
|
|
24
|
-
* You should use this with a `Host` component in ancestor.
|
|
25
|
-
*/
|
|
26
|
-
export declare function CircularProgressPrimitive(props: CircularProgressProps): import("react").JSX.Element;
|
|
27
|
-
/**
|
|
28
|
-
* `<LinearProgress>` component without a host view.
|
|
29
|
-
* You should use this with a `Host` component in ancestor.
|
|
30
|
-
*/
|
|
31
|
-
export declare function LinearProgressPrimitive(props: LinearProgressProps): import("react").JSX.Element;
|
|
22
|
+
} & CommonViewModifierProps;
|
|
32
23
|
/**
|
|
33
24
|
* Renders a `CircularProgress` component.
|
|
34
25
|
*/
|
|
35
|
-
export declare function CircularProgress(props: CircularProgressProps
|
|
36
|
-
style?: StyleProp<ViewStyle>;
|
|
37
|
-
}): import("react").JSX.Element;
|
|
26
|
+
export declare function CircularProgress(props: CircularProgressProps): import("react").JSX.Element;
|
|
38
27
|
/**
|
|
39
28
|
* Renders a `LinearProgress` component.
|
|
40
29
|
*/
|
|
41
|
-
export declare function LinearProgress(props: LinearProgressProps
|
|
42
|
-
style?: StyleProp<ViewStyle>;
|
|
43
|
-
}): import("react").JSX.Element;
|
|
30
|
+
export declare function LinearProgress(props: LinearProgressProps): import("react").JSX.Element;
|
|
44
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Progress/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Progress/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB,GAAG,uBAAuB,CAAC;AAE5B,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB,GAAG,uBAAuB,CAAC;AAa5B;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,+BAU5D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAUxD"}
|
|
@@ -1,34 +1,18 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
-
import {
|
|
2
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
3
3
|
const NativeProgressView = requireNativeView('ExpoUI', 'ProgressView');
|
|
4
|
-
/**
|
|
5
|
-
* `<CircularProgress>` component without a host view.
|
|
6
|
-
* You should use this with a `Host` component in ancestor.
|
|
7
|
-
*/
|
|
8
|
-
export function CircularProgressPrimitive(props) {
|
|
9
|
-
return <NativeProgressView {...props} variant="circular"/>;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* `<LinearProgress>` component without a host view.
|
|
13
|
-
* You should use this with a `Host` component in ancestor.
|
|
14
|
-
*/
|
|
15
|
-
export function LinearProgressPrimitive(props) {
|
|
16
|
-
return <NativeProgressView {...props} variant="linear"/>;
|
|
17
|
-
}
|
|
18
4
|
/**
|
|
19
5
|
* Renders a `CircularProgress` component.
|
|
20
6
|
*/
|
|
21
7
|
export function CircularProgress(props) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</Host>);
|
|
8
|
+
const { modifiers, ...restProps } = props;
|
|
9
|
+
return (<NativeProgressView modifiers={modifiers} {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)} {...restProps} variant="circular"/>);
|
|
25
10
|
}
|
|
26
11
|
/**
|
|
27
12
|
* Renders a `LinearProgress` component.
|
|
28
13
|
*/
|
|
29
14
|
export function LinearProgress(props) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</Host>);
|
|
15
|
+
const { modifiers, ...restProps } = props;
|
|
16
|
+
return (<NativeProgressView modifiers={modifiers} {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)} {...restProps} variant="linear"/>);
|
|
33
17
|
}
|
|
34
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/Progress/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/Progress/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AA+BrE,MAAM,kBAAkB,GAA6C,iBAAiB,CACpF,QAAQ,EACR,cAAc,CACf,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAA4B;IAC3D,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAC1C,OAAO,CACL,CAAC,kBAAkB,CACjB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CACzE,IAAI,SAAS,CAAC,CACd,OAAO,CAAC,UAAU,EAClB,CACH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAC1C,OAAO,CACL,CAAC,kBAAkB,CACjB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CACzE,IAAI,SAAS,CAAC,CACd,OAAO,CAAC,QAAQ,EAChB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport { ColorValue } from 'react-native';\n\nimport { createViewModifierEventListener } from '../modifiers/utils';\nimport { type CommonViewModifierProps } from '../types';\n\nexport type CircularProgressProps = {\n /**\n * The current progress value of the slider. This is a number between `0` and `1`.\n */\n progress?: number | null;\n /**\n * Progress color.\n */\n color?: ColorValue;\n} & CommonViewModifierProps;\n\nexport type LinearProgressProps = {\n /**\n * The current progress value of the slider. This is a number between `0` and `1`.\n */\n progress?: number | null;\n /**\n * Progress color.\n */\n color?: ColorValue;\n} & CommonViewModifierProps;\n\ntype NativeProgressProps =\n | CircularProgressProps\n | (LinearProgressProps & {\n variant: 'linear' | 'circular';\n });\n\nconst NativeProgressView: React.ComponentType<NativeProgressProps> = requireNativeView(\n 'ExpoUI',\n 'ProgressView'\n);\n\n/**\n * Renders a `CircularProgress` component.\n */\nexport function CircularProgress(props: CircularProgressProps) {\n const { modifiers, ...restProps } = props;\n return (\n <NativeProgressView\n modifiers={modifiers}\n {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}\n {...restProps}\n variant=\"circular\"\n />\n );\n}\n\n/**\n * Renders a `LinearProgress` component.\n */\nexport function LinearProgress(props: LinearProgressProps) {\n const { modifiers, ...restProps } = props;\n return (\n <NativeProgressView\n modifiers={modifiers}\n {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}\n {...restProps}\n variant=\"linear\"\n />\n );\n}\n"]}
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type CommonViewModifierProps } from '../types';
|
|
2
2
|
export type SectionProps = {
|
|
3
3
|
/**
|
|
4
4
|
* On iOS, section titles are usually capitalized for consistency with platform conventions.
|
|
5
5
|
*/
|
|
6
6
|
title?: string;
|
|
7
|
-
children:
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* `<Section>` component without a host view.
|
|
11
|
-
* You should use this with a `Host` component in ancestor.
|
|
12
|
-
*/
|
|
13
|
-
export declare function SectionPrimitive(props: SectionProps): import("react").JSX.Element;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
} & CommonViewModifierProps;
|
|
14
9
|
/**
|
|
15
10
|
* Section component uses the native [Section](https://developer.apple.com/documentation/swiftui/section) component.
|
|
16
11
|
* It has no intrinsic dimensions, so it needs explicit height or flex set to display content (like ScrollView).
|
|
17
12
|
* @platform ios
|
|
18
13
|
*/
|
|
19
|
-
export declare function Section(props: SectionProps
|
|
20
|
-
style?: StyleProp<ViewStyle>;
|
|
21
|
-
}): import("react").JSX.Element;
|
|
14
|
+
export declare function Section(props: SectionProps): import("react").JSX.Element;
|
|
22
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Section/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/Section/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,uBAAuB,CAAC;AAO5B;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,+BAS1C"}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
-
import {
|
|
2
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
3
3
|
const SectionNativeView = requireNativeView('ExpoUI', 'SectionView');
|
|
4
|
-
/**
|
|
5
|
-
* `<Section>` component without a host view.
|
|
6
|
-
* You should use this with a `Host` component in ancestor.
|
|
7
|
-
*/
|
|
8
|
-
export function SectionPrimitive(props) {
|
|
9
|
-
return <SectionNativeView {...props}/>;
|
|
10
|
-
}
|
|
11
4
|
/**
|
|
12
5
|
* Section component uses the native [Section](https://developer.apple.com/documentation/swiftui/section) component.
|
|
13
6
|
* It has no intrinsic dimensions, so it needs explicit height or flex set to display content (like ScrollView).
|
|
14
7
|
* @platform ios
|
|
15
8
|
*/
|
|
16
9
|
export function Section(props) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</Host>);
|
|
10
|
+
const { modifiers, ...restProps } = props;
|
|
11
|
+
return (<SectionNativeView modifiers={modifiers} {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)} {...restProps}/>);
|
|
20
12
|
}
|
|
21
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/Section/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/Section/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAWrE,MAAM,iBAAiB,GAAsC,iBAAiB,CAC5E,QAAQ,EACR,aAAa,CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,KAAmB;IACzC,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAC1C,OAAO,CACL,CAAC,iBAAiB,CAChB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CACzE,IAAI,SAAS,CAAC,EACd,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\n\nimport { createViewModifierEventListener } from '../modifiers/utils';\nimport { type CommonViewModifierProps } from '../types';\n\nexport type SectionProps = {\n /**\n * On iOS, section titles are usually capitalized for consistency with platform conventions.\n */\n title?: string;\n children: React.ReactNode;\n} & CommonViewModifierProps;\n\nconst SectionNativeView: React.ComponentType<SectionProps> = requireNativeView(\n 'ExpoUI',\n 'SectionView'\n);\n\n/**\n * Section component uses the native [Section](https://developer.apple.com/documentation/swiftui/section) component.\n * It has no intrinsic dimensions, so it needs explicit height or flex set to display content (like ScrollView).\n * @platform ios\n */\nexport function Section(props: SectionProps) {\n const { modifiers, ...restProps } = props;\n return (\n <SectionNativeView\n modifiers={modifiers}\n {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}\n {...restProps}\n />\n );\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { ViewEvent } from '../../types';
|
|
4
2
|
import { TextFieldKeyboardType } from '../TextField';
|
|
3
|
+
import { type CommonViewModifierProps } from '../types';
|
|
5
4
|
/**
|
|
6
5
|
* Can be used for imperatively setting text on the SecureField component.
|
|
7
6
|
*/
|
|
@@ -23,19 +22,9 @@ export type SecureFieldProps = {
|
|
|
23
22
|
*/
|
|
24
23
|
onChangeText: (value: string) => void;
|
|
25
24
|
keyboardType?: TextFieldKeyboardType;
|
|
26
|
-
};
|
|
27
|
-
export type NativeSecureFieldProps = Omit<SecureFieldProps, 'onChangeText'> & {} & ViewEvent<'onValueChanged', {
|
|
28
|
-
value: string;
|
|
29
|
-
}>;
|
|
25
|
+
} & CommonViewModifierProps;
|
|
30
26
|
/**
|
|
31
27
|
* Renders a `SecureField` component. Should mostly be used for embedding text inputs inside of SwiftUI lists and sections. Is an uncontrolled component.
|
|
32
28
|
*/
|
|
33
|
-
export declare function SecureField(props: SecureFieldProps
|
|
34
|
-
style?: StyleProp<ViewStyle>;
|
|
35
|
-
}): import("react").JSX.Element;
|
|
36
|
-
/**
|
|
37
|
-
* `<SecureField>` component without a host view.
|
|
38
|
-
* You should use this with a `Host` component in ancestor.
|
|
39
|
-
*/
|
|
40
|
-
export declare function SecureFieldPrimitive(props: SecureFieldProps): import("react").JSX.Element;
|
|
29
|
+
export declare function SecureField(props: SecureFieldProps): import("react").JSX.Element;
|
|
41
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/SecureField/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/SecureField/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC,GAAG,uBAAuB,CAAC;AAyB5B;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAElD"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { requireNativeView } from 'expo';
|
|
2
|
-
import {
|
|
2
|
+
import { createViewModifierEventListener } from '../modifiers/utils';
|
|
3
3
|
// We have to work around the `role` and `onPress` props being reserved by React Native.
|
|
4
4
|
const SecureFieldNativeView = requireNativeView('ExpoUI', 'SecureFieldView');
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
5
|
function transformSecureFieldProps(props) {
|
|
6
|
+
const { modifiers, ...restProps } = props;
|
|
9
7
|
return {
|
|
10
|
-
|
|
8
|
+
modifiers,
|
|
9
|
+
...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
|
|
10
|
+
...restProps,
|
|
11
11
|
onValueChanged: (event) => {
|
|
12
12
|
props.onChangeText?.(event.nativeEvent.value);
|
|
13
13
|
},
|
|
@@ -17,15 +17,6 @@ function transformSecureFieldProps(props) {
|
|
|
17
17
|
* Renders a `SecureField` component. Should mostly be used for embedding text inputs inside of SwiftUI lists and sections. Is an uncontrolled component.
|
|
18
18
|
*/
|
|
19
19
|
export function SecureField(props) {
|
|
20
|
-
return (<Host style={props.style} matchContents>
|
|
21
|
-
<SecureFieldPrimitive {...props}/>
|
|
22
|
-
</Host>);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* `<SecureField>` component without a host view.
|
|
26
|
-
* You should use this with a `Host` component in ancestor.
|
|
27
|
-
*/
|
|
28
|
-
export function SecureFieldPrimitive(props) {
|
|
29
20
|
return <SecureFieldNativeView {...transformSecureFieldProps(props)}/>;
|
|
30
21
|
}
|
|
31
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/SecureField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAKzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/swift-ui/SecureField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAKzC,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAgCrE,wFAAwF;AACxF,MAAM,qBAAqB,GAAgD,iBAAiB,CAC1F,QAAQ,EACR,iBAAiB,CAClB,CAAC;AAEF,SAAS,yBAAyB,CAAC,KAAuB;IACxD,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAC1C,OAAO;QACL,SAAS;QACT,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACvE,GAAG,SAAS;QACZ,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE;YACxB,KAAK,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAChD,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,OAAO,CAAC,qBAAqB,CAAC,IAAI,yBAAyB,CAAC,KAAK,CAAC,CAAC,EAAG,CAAC;AACzE,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport { Ref } from 'react';\n\nimport { type ViewEvent } from '../../types';\nimport { TextFieldKeyboardType } from '../TextField';\nimport { createViewModifierEventListener } from '../modifiers/utils';\nimport { type CommonViewModifierProps } from '../types';\n\n/**\n * Can be used for imperatively setting text on the SecureField component.\n */\nexport type SecureFieldRef = {\n setText: (newText: string) => Promise<void>;\n};\n\nexport type SecureFieldProps = {\n ref?: Ref<SecureFieldRef>;\n /**\n * Initial value that the SecureField displays when being mounted. As the SecureField is an uncontrolled component, change the key prop if you need to change the text value.\n */\n defaultValue?: string;\n /**\n * A text that is displayed when the field is empty.\n */\n placeholder?: string;\n /**\n * A callback triggered when user types in text into the SecureField.\n */\n onChangeText: (value: string) => void;\n keyboardType?: TextFieldKeyboardType;\n} & CommonViewModifierProps;\n\ntype NativeSecureFieldProps = Omit<SecureFieldProps, 'onChangeText'> & {} & ViewEvent<\n 'onValueChanged',\n { value: string }\n >;\n\n// We have to work around the `role` and `onPress` props being reserved by React Native.\nconst SecureFieldNativeView: React.ComponentType<NativeSecureFieldProps> = requireNativeView(\n 'ExpoUI',\n 'SecureFieldView'\n);\n\nfunction transformSecureFieldProps(props: SecureFieldProps): NativeSecureFieldProps {\n const { modifiers, ...restProps } = props;\n return {\n modifiers,\n ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),\n ...restProps,\n onValueChanged: (event) => {\n props.onChangeText?.(event.nativeEvent.value);\n },\n };\n}\n\n/**\n * Renders a `SecureField` component. Should mostly be used for embedding text inputs inside of SwiftUI lists and sections. Is an uncontrolled component.\n */\nexport function SecureField(props: SecureFieldProps) {\n return <SecureFieldNativeView {...transformSecureFieldProps(props)} />;\n}\n"]}
|