@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/jetpack-compose/ContextMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,QAAQ,EAA2B,OAAO,EAAE,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAe,+BAA+B,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/ContextMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,QAAQ,EAA2B,OAAO,EAAE,M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B,CAAC,WAAmB,EAAE,EAAE,CAAC,CAAC,CAAyD,EAAE,EAAE;QACrF,MAAM,OAAO,GAAG,gBAAgB,CAAC,CAAC,CAAC,WAAW,CAAC,oBAAoB,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;QACpF,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IACf,CAAC,CAAC;IAEJ,OAAO,CACL,CAAC,cAAc,CACb,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACnB,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAC5B,0BAA0B,CAAC,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAC1D,+BAA+B,CAAC,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CACrE,iCAAiC,CAAC,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;IAC1E,mBAAmB;IACnB,SAAS,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CACpE,IAAI,KAAK,CAAC,CACV;MAAA,CAAC,iBAAiB,CACpB;IAAA,EAAE,cAAc,CAAC,CAClB,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC;AAC9B,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC;AAC9B,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport { Children, ReactElement, ReactNode, useMemo } from 'react';\nimport { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\n\nimport { MenuElement, transformChildrenToElementArray } from './utils';\nimport { ExpoModifier } from '../../types';\nimport { ButtonProps } from '../Button';\nimport { PickerProps } from '../Picker';\nimport { SwitchProps } from '../Switch';\n\nconst MenuNativeView: React.ComponentType<NativeMenuProps> = requireNativeView(\n 'ExpoUI',\n 'ContextMenu'\n);\n\ntype SubmenuElement =\n | ReactElement<ButtonProps>\n | ReactElement<SwitchProps>\n | ReactElement<PickerProps>\n | ReactElement<SubmenuProps>;\n\nexport type ContextMenuContentProps = {\n children: SubmenuElement | SubmenuElement[];\n};\n\n/**\n * @hidden\n */\nexport type EventHandlers = Record<\n string,\n Record<string, (event: NativeSyntheticEvent<any>) => void>\n>;\n\n/**\n * @hidden\n */\nexport type ContextMenuElementBase = { contextMenuElementID: string };\n\n/**\n * Activation method of the context menu.\n * - `singlePress`: The context menu is opened with a single tap. Does not isolate the content.\n * - `longPress`: The context menu is opened with a long press. On iOS additionally Highlights the content by blurring the background.\n */\nexport type ActivationMethod = 'singlePress' | 'longPress';\n\n/**\n * Props of the `ContextMenu` component.\n */\nexport type ContextMenuProps = {\n /**\n * Determines how the context menu will be activated.\n *\n * @platform ios\n */\n activationMethod?: ActivationMethod;\n\n /**\n * The contents of the submenu are used as an anchor for the context menu.\n * The children will be wrapped in a pressable element, which triggers opening of the context menu.\n */\n children: ReactNode;\n\n /**\n * The color of the container holding the context menu items.\n *\n * @platform android\n */\n color?: string;\n\n /**\n * Optional styles to apply to the `ContextMenu`.\n */\n style?: StyleProp<ViewStyle>;\n\n /** Modifiers for the component */\n modifiers?: ExpoModifier[];\n};\n\n/**\n * Props of the `Submenu` component.\n */\nexport type SubmenuProps = {\n /**\n * The button that will be used to expand the submenu. On Android the `text` prop of the `Button` will be used as a section title.\n */\n button: ReactElement<ButtonProps>;\n /**\n * Children of the submenu. Only `Button`, `Switch`, `Picker` and `Submenu` elements should be used.\n */\n children: ReactNode;\n};\n\n/**\n * @hidden\n */\ntype NativeMenuProps = ContextMenuProps & {\n elements: MenuElement[];\n onContextMenuButtonPressed: (\n event: NativeSyntheticEvent<{ contextMenuElementID: string }>\n ) => void;\n onContextMenuSwitchValueChanged: (\n event: NativeSyntheticEvent<{\n contextMenuElementID: string;\n value: boolean;\n }>\n ) => void;\n onContextMenuPickerOptionSelected: (\n event: NativeSyntheticEvent<{\n index: number;\n label: string;\n contextMenuElementID: string;\n }>\n ) => void;\n};\n\nexport function Submenu() {\n return <></>;\n}\n\nexport function Items() {\n return <></>;\n}\nItems.tag = 'Items';\n\nexport function Trigger(props: { children: React.ReactNode }) {\n return <></>;\n}\nTrigger.tag = 'Trigger';\n\nexport function Preview(props: { children: React.ReactNode }) {\n return <></>;\n}\n\nfunction ContextMenu(props: ContextMenuProps) {\n const eventHandlersMap: EventHandlers = {};\n const initialChildren = Children.map(\n props.children as any,\n (c: { type: { tag: string }; props: { children: React.ReactNode } }) =>\n c.type.tag === Items.tag ? c.props.children : null\n );\n const processedElements = useMemo(\n () => transformChildrenToElementArray(initialChildren, eventHandlersMap),\n [initialChildren]\n );\n\n const activationElement = Children.map(\n props.children as any,\n (c: { type: { tag: string }; props: { children: React.ReactNode } }) =>\n c.type.tag === Trigger.tag ? c.props.children : null\n );\n\n const createEventHandler =\n (handlerType: string) => (e: NativeSyntheticEvent<{ contextMenuElementID: string }>) => {\n const handler = eventHandlersMap[e.nativeEvent.contextMenuElementID]?.[handlerType];\n handler?.(e);\n };\n\n return (\n <MenuNativeView\n style={props.style}\n elements={processedElements}\n onContextMenuButtonPressed={createEventHandler('onPress')}\n onContextMenuSwitchValueChanged={createEventHandler('onValueChange')}\n onContextMenuPickerOptionSelected={createEventHandler('onOptionSelected')}\n // @ts-expect-error\n modifiers={props.modifiers?.map((m) => m.__expo_shared_object_id__)}\n {...props}>\n {activationElement}\n </MenuNativeView>\n );\n}\n\nContextMenu.Trigger = Trigger;\nContextMenu.Preview = Preview;\nContextMenu.Items = Items;\n\nexport { ContextMenu };\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
import { ViewEvent } from '../../types';
|
|
2
|
+
import { ExpoModifier, ViewEvent } from '../../types';
|
|
3
3
|
export type AndroidVariant = 'picker' | 'input';
|
|
4
4
|
export type DisplayedComponents = 'date' | 'hourAndMinute' | 'dateAndTime';
|
|
5
5
|
export type DateTimePickerProps = {
|
|
@@ -42,6 +42,8 @@ export type DateTimePickerProps = {
|
|
|
42
42
|
* @default true
|
|
43
43
|
*/
|
|
44
44
|
is24Hour?: boolean;
|
|
45
|
+
/** Modifiers for the component */
|
|
46
|
+
modifiers?: ExpoModifier[];
|
|
45
47
|
};
|
|
46
48
|
type NativeDatePickerProps = Omit<DateTimePickerProps, 'variant' | 'onDateSelected'> & {
|
|
47
49
|
variant?: AndroidVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/DatePicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAA0B,MAAM,cAAc,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/DatePicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAA0B,MAAM,cAAc,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,eAAe,GAAG,aAAa,CAAC;AAE3E,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,KAAK,qBAAqB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,gBAAgB,CAAC,GAAG;IACrF,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B,GAAG,SAAS,CAAC,gBAAgB,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AAEhD;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,mBAAmB,GAAG,qBAAqB,CAsB9F;AAOD;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAExD"}
|
|
@@ -18,6 +18,8 @@ export function transformDateTimePickerProps(props) {
|
|
|
18
18
|
props?.onDateSelected?.(new Date(date));
|
|
19
19
|
},
|
|
20
20
|
variant,
|
|
21
|
+
// @ts-expect-error
|
|
22
|
+
modifiers: props.modifiers?.map((m) => m.__expo_shared_object_id__),
|
|
21
23
|
style: [restStyle, { minWidth: parsedMinWidth, minHeight: parsedMinHeight }],
|
|
22
24
|
};
|
|
23
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/DatePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAwB,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/DatePicker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAA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AC,EAAG,CAAC;AAC3E,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport { StyleProp, ViewStyle, StyleSheet, PixelRatio } from 'react-native';\n\nimport { ExpoModifier, ViewEvent } from '../../types';\n\nexport type AndroidVariant = 'picker' | 'input';\n\nexport type DisplayedComponents = 'date' | 'hourAndMinute' | 'dateAndTime';\n\nexport type DateTimePickerProps = {\n /**\n * The initial date to display on the picker.\n */\n initialDate?: string | null;\n /**\n * Callback function that is called when a date is selected.\n */\n onDateSelected?: (date: Date) => void;\n /**\n * The variant of the picker, which determines its appearance and behavior.\n * @default 'picker'\n */\n variant?: AndroidVariant;\n /**\n * Show to button to toggle between variants on Android.\n * @default true\n */\n showVariantToggle?: boolean;\n /**\n * The components that the picker should display.\n * On Android, you can have a picker that selects just the date or just the time.\n * `dateAndTime` is only available on iOS and will result in a date picker on Android.\n * On iOS, you can have a picker that selects both date and time.\n * @default 'date'\n */\n displayedComponents?: DisplayedComponents;\n /**\n * Optional style to apply to the component.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * The tint color to use on the picker elements.\n */\n color?: string;\n /**\n * Determines what format the clock should be displayed in on Android.\n * @default true\n */\n is24Hour?: boolean;\n /** Modifiers for the component */\n modifiers?: ExpoModifier[];\n};\n\ntype NativeDatePickerProps = Omit<DateTimePickerProps, 'variant' | 'onDateSelected'> & {\n variant?: AndroidVariant;\n} & ViewEvent<'onDateSelected', { date: Date }>;\n\n/**\n * @hidden\n */\nexport function transformDateTimePickerProps(props: DateTimePickerProps): NativeDatePickerProps {\n const { variant, ...rest } = props;\n const { minWidth, minHeight, ...restStyle } = StyleSheet.flatten(rest.style) || {};\n\n // On Android, the picker’s minWidth and minHeight must be 12dp.\n // Otherwise, the picker will crash the app.\n const minSize = PixelRatio.getPixelSizeForLayoutSize(12);\n\n // However, when users pass the minWidth and minHeight props, we trust that they know what they are doing.\n const parsedMinWidth = minWidth ? minSize : undefined;\n const parsedMinHeight = minHeight ? minSize : undefined;\n\n return {\n ...rest,\n onDateSelected: ({ nativeEvent: { date } }) => {\n props?.onDateSelected?.(new Date(date));\n },\n variant,\n // @ts-expect-error\n modifiers: props.modifiers?.map((m) => m.__expo_shared_object_id__),\n style: [restStyle, { minWidth: parsedMinWidth, minHeight: parsedMinHeight }],\n };\n}\n\nconst DatePickerNativeView: React.ComponentType<NativeDatePickerProps> = requireNativeView(\n 'ExpoUI',\n 'DateTimePickerView'\n);\n\n/**\n * Renders a `DateTimePicker` component.\n */\nexport function DateTimePicker(props: DateTimePickerProps) {\n return <DatePickerNativeView {...transformDateTimePickerProps(props)} />;\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import { ExpoModifier } from '../../types';
|
|
2
3
|
/**
|
|
3
4
|
* Colors for picker's core elements.
|
|
4
5
|
*/
|
|
@@ -52,6 +53,10 @@ export type PickerProps = {
|
|
|
52
53
|
* Picker color.
|
|
53
54
|
*/
|
|
54
55
|
color?: string;
|
|
56
|
+
/** Modifiers for the component */
|
|
57
|
+
modifiers?: ExpoModifier[];
|
|
58
|
+
/** Modifiers for the individual buttons */
|
|
59
|
+
buttonModifiers?: ExpoModifier[];
|
|
55
60
|
};
|
|
56
61
|
type NativePickerProps = PickerProps;
|
|
57
62
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Picker/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC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
17
|
color: props.color,
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
modifiers: props.modifiers?.map((m) => m.__expo_shared_object_id__),
|
|
20
|
+
// @ts-expect-error
|
|
21
|
+
buttonModifiers: props.buttonModifiers?.map((m) => m.__expo_shared_object_id__),
|
|
18
22
|
};
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/Picker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/Picker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AA6DzC,MAAM,gBAAgB,GAAqC,iBAAiB,CAC1E,QAAQ,EACR,YAAY,CACb,CAAC;AAIF;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAkB;IACrD,OAAO;QACL,GAAG,KAAK;QACR,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,WAAW;QACrC,aAAa,EAAE,KAAK,CAAC,aAAa;YAChC,CAAC,CAAC,KAAK,CAAC,aAAa;YACrB,CAAC,CAAC,KAAK,CAAC,KAAK;gBACX,CAAC,CAAC;oBACE,oBAAoB,EAAE,KAAK,CAAC,KAAK;iBAClC;gBACH,CAAC,CAAC,SAAS;QACf,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,mBAAmB;QACnB,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC;QACnE,mBAAmB;QACnB,eAAe,EAAE,KAAK,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC;KAChF,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';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport { ExpoModifier } from '../../types';\n\n/**\n * Colors for picker's core elements.\n */\nexport type PickerElementColors = {\n activeBorderColor?: string;\n activeContentColor?: string;\n inactiveBorderColor?: string;\n inactiveContentColor?: string;\n disabledActiveBorderColor?: string;\n disabledActiveContentColor?: string;\n disabledInactiveBorderColor?: string;\n disabledInactiveContentColor?: string;\n activeContainerColor?: string;\n inactiveContainerColor?: string;\n disabledActiveContainerColor?: string;\n disabledInactiveContainerColor?: string;\n};\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 * 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?: 'segmented' | 'radio';\n /**\n * Optional style to apply to the picker component.\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Colors for picker's core elements.\n */\n elementColors?: PickerElementColors;\n /**\n * Picker color.\n */\n color?: string;\n /** Modifiers for the component */\n modifiers?: ExpoModifier[];\n /** Modifiers for the individual buttons */\n buttonModifiers?: ExpoModifier[];\n};\n\nconst PickerNativeView: React.ComponentType<PickerProps> = requireNativeView(\n 'ExpoUI',\n 'PickerView'\n);\n\ntype NativePickerProps = PickerProps;\n\n/**\n * @hidden\n */\nexport function transformPickerProps(props: PickerProps): NativePickerProps {\n return {\n ...props,\n variant: props.variant ?? 'segmented',\n elementColors: props.elementColors\n ? props.elementColors\n : props.color\n ? {\n activeContainerColor: props.color,\n }\n : undefined,\n color: props.color,\n // @ts-expect-error\n modifiers: props.modifiers?.map((m) => m.__expo_shared_object_id__),\n // @ts-expect-error\n buttonModifiers: props.buttonModifiers?.map((m) => m.__expo_shared_object_id__),\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
1
|
import { ColorValue, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import { ExpoModifier } from '../../types';
|
|
2
3
|
export type ProgressElementColors = {
|
|
3
4
|
/**
|
|
4
5
|
* Track color.
|
|
@@ -25,6 +26,8 @@ export type CircularProgressProps = {
|
|
|
25
26
|
* @platform android
|
|
26
27
|
*/
|
|
27
28
|
elementColors?: ProgressElementColors;
|
|
29
|
+
/** Modifiers for the component */
|
|
30
|
+
modifiers?: ExpoModifier[];
|
|
28
31
|
};
|
|
29
32
|
export type LinearProgressProps = {
|
|
30
33
|
/**
|
|
@@ -44,6 +47,8 @@ export type LinearProgressProps = {
|
|
|
44
47
|
* @platform android
|
|
45
48
|
*/
|
|
46
49
|
elementColors?: ProgressElementColors;
|
|
50
|
+
/** Modifiers for the component */
|
|
51
|
+
modifiers?: ExpoModifier[];
|
|
47
52
|
};
|
|
48
53
|
/**
|
|
49
54
|
* Renders a `CircularProgress` component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Progress/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,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GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,+BAQ5D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAQxD"}
|
|
@@ -4,12 +4,14 @@ const NativeProgressView = requireNativeView('ExpoUI', 'ProgressView');
|
|
|
4
4
|
* Renders a `CircularProgress` component.
|
|
5
5
|
*/
|
|
6
6
|
export function CircularProgress(props) {
|
|
7
|
-
return <NativeProgressView {...props}
|
|
7
|
+
return (<NativeProgressView {...props} // @ts-expect-error
|
|
8
|
+
modifiers={props.modifiers?.map((m) => m.__expo_shared_object_id__)} variant="circular"/>);
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Renders a `LinearProgress` component.
|
|
11
12
|
*/
|
|
12
13
|
export function LinearProgress(props) {
|
|
13
|
-
return <NativeProgressView {...props}
|
|
14
|
+
return (<NativeProgressView {...props} // @ts-expect-error
|
|
15
|
+
modifiers={props.modifiers?.map((m) => m.__expo_shared_object_id__)} variant="linear"/>);
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/Progress/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/Progress/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAgEzC,MAAM,kBAAkB,GAA6C,iBAAiB,CACpF,QAAQ,EACR,cAAc,CACf,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAA4B;IAC3D,OAAO,CACL,CAAC,kBAAkB,CACjB,IAAI,KAAK,CAAC,CAAC,mBAAmB;KAC9B,SAAS,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CACpE,OAAO,CAAC,UAAU,EAClB,CACH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,OAAO,CACL,CAAC,kBAAkB,CACjB,IAAI,KAAK,CAAC,CAAC,mBAAmB;KAC9B,SAAS,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CACpE,OAAO,CAAC,QAAQ,EAChB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport { ColorValue, StyleProp, ViewStyle } from 'react-native';\n\nimport { ExpoModifier } from '../../types';\n\nexport type ProgressElementColors = {\n /**\n * Track color.\n *\n * @platform android\n */\n trackColor?: ColorValue;\n};\n\nexport type CircularProgressProps = {\n /**\n * Custom styles for the progress component.\n */\n style?: StyleProp<ViewStyle>;\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 /**\n * Colors for switch's core elements.\n * @platform android\n */\n elementColors?: ProgressElementColors;\n /** Modifiers for the component */\n modifiers?: ExpoModifier[];\n};\n\nexport type LinearProgressProps = {\n /**\n * Custom styles for the progress component.\n */\n style?: StyleProp<ViewStyle>;\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 /**\n * Colors for switch's core elements.\n * @platform android\n */\n elementColors?: ProgressElementColors;\n /** Modifiers for the component */\n modifiers?: ExpoModifier[];\n};\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 return (\n <NativeProgressView\n {...props} // @ts-expect-error\n modifiers={props.modifiers?.map((m) => m.__expo_shared_object_id__)}\n variant=\"circular\"\n />\n );\n}\n\n/**\n * Renders a `LinearProgress` component.\n */\nexport function LinearProgress(props: LinearProgressProps) {\n return (\n <NativeProgressView\n {...props} // @ts-expect-error\n modifiers={props.modifiers?.map((m) => m.__expo_shared_object_id__)}\n variant=\"linear\"\n />\n );\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViewStyle } from 'react-native';
|
|
2
|
+
import { ExpoModifier } from '../../types';
|
|
2
3
|
export type ShapeProps = {
|
|
3
4
|
/**
|
|
4
5
|
* Corner rounding percentage. Multiplied by the shorter dimension of the view to produce pixel values.
|
|
@@ -29,13 +30,15 @@ export type ShapeProps = {
|
|
|
29
30
|
style?: ViewStyle;
|
|
30
31
|
/** Color of the shape */
|
|
31
32
|
color?: string;
|
|
33
|
+
/** Modifiers for the component */
|
|
34
|
+
modifiers?: ExpoModifier[];
|
|
32
35
|
};
|
|
33
36
|
declare function Star(props: ShapeProps): import("react").JSX.Element;
|
|
34
37
|
declare function PillStar(props: ShapeProps): import("react").JSX.Element;
|
|
35
38
|
declare function Pill(props: Pick<ShapeProps, 'smoothing' | 'style' | 'color'>): import("react").JSX.Element;
|
|
36
39
|
declare function Circle(props: Pick<ShapeProps, 'radius' | 'verticesCount' | 'style' | 'color'>): import("react").JSX.Element;
|
|
37
40
|
declare function Rectangle(props: Pick<ShapeProps, 'smoothing' | 'cornerRounding' | 'style' | 'color'>): import("react").JSX.Element;
|
|
38
|
-
declare function Polygon(props: Pick<ShapeProps, 'smoothing' | 'cornerRounding' | 'verticesCount' | 'style' | 'color'>): import("react").JSX.Element;
|
|
41
|
+
declare function Polygon(props: Pick<ShapeProps, 'smoothing' | 'cornerRounding' | 'verticesCount' | 'style' | 'color' | 'modifiers'>): import("react").JSX.Element;
|
|
39
42
|
export declare const Shape: {
|
|
40
43
|
Star: typeof Star;
|
|
41
44
|
PillStar: typeof PillStar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Shape/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Shape/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAIF,iBAAS,IAAI,CAAC,KAAK,EAAE,UAAU,+BAE9B;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,UAAU,+BAElC;AAED,iBAAS,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC,+BAErE;AAED,iBAAS,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,OAAO,CAAC,+BAEtF;AAED,iBAAS,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC,+BAE7F;AAED,iBAAS,OAAO,CACd,KAAK,EAAE,IAAI,CACT,UAAU,EACV,WAAW,GAAG,gBAAgB,GAAG,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CACnF,+BAWF;AAED,eAAO,MAAM,KAAK;;;;;;;CAOjB,CAAC"}
|
|
@@ -16,7 +16,9 @@ function Rectangle(props) {
|
|
|
16
16
|
return <ShapeNativeView {...props} style={props.style} type="rectangle"/>;
|
|
17
17
|
}
|
|
18
18
|
function Polygon(props) {
|
|
19
|
-
return <ShapeNativeView {...props}
|
|
19
|
+
return (<ShapeNativeView {...props}
|
|
20
|
+
// @ts-expect-error
|
|
21
|
+
modifiers={props.modifiers?.map((m) => m.__expo_shared_object_id__)} style={props.style} type="polygon"/>);
|
|
20
22
|
}
|
|
21
23
|
export const Shape = {
|
|
22
24
|
Star,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/Shape/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/Shape/index.tsx"],"names":[],"mappings":"AAAA,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,CAAC,KAAK,CAAC,KAAK,CAAC,CACnB,IAAI,CAAC,SAAS,EACd,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI;IACJ,QAAQ;IACR,IAAI;IACJ,MAAM;IACN,SAAS;IACT,OAAO;CACR,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport { ViewStyle } from 'react-native';\n\nimport { ExpoModifier } from '../../types';\n\nexport type ShapeProps = {\n /**\n * Corner rounding percentage. Multiplied by the shorter dimension of the view to produce pixel values.\n * @default 0.0\n */\n cornerRounding?: number;\n /**\n * Number between `0.0` and `1.0` that determines how much each line between vertices is \"smoothed\".\n * @default 0.0\n */\n smoothing?: number;\n /**\n * Number of vertices. For `'POLYGON'` it must be at least `3.0`. For `'STAR'` and `'PILL_STAR'` it is a number of vertices for each of two radii (A 5-pointed star has 10 vertices.)\n * @default 6.0\n */\n verticesCount?: number;\n /**\n * Inner radius of star-related shapes (`'STAR'` and `'PILL_STAR'`). Multiplied by the shorter dimension of the view to produce pixel values.\n * @default 1.0\n */\n innerRadius?: number;\n /**\n * Radius of the circular shape. Multiplied by the shorter dimension of the view to produce pixel values.\n * @default 1.0\n */\n radius?: number;\n /** Style of the component */\n style?: ViewStyle;\n /** Color of the shape */\n color?: string;\n /** Modifiers for the component */\n modifiers?: ExpoModifier[];\n};\n\nconst ShapeNativeView: React.ComponentType<any> = requireNativeView('ExpoUI', 'ShapeView');\n\nfunction Star(props: ShapeProps) {\n return <ShapeNativeView {...props} style={props.style} type=\"star\" />;\n}\n\nfunction PillStar(props: ShapeProps) {\n return <ShapeNativeView {...props} style={props.style} type=\"pillStar\" />;\n}\n\nfunction Pill(props: Pick<ShapeProps, 'smoothing' | 'style' | 'color'>) {\n return <ShapeNativeView {...props} style={props.style} type=\"pill\" />;\n}\n\nfunction Circle(props: Pick<ShapeProps, 'radius' | 'verticesCount' | 'style' | 'color'>) {\n return <ShapeNativeView {...props} style={props.style} type=\"circle\" />;\n}\n\nfunction Rectangle(props: Pick<ShapeProps, 'smoothing' | 'cornerRounding' | 'style' | 'color'>) {\n return <ShapeNativeView {...props} style={props.style} type=\"rectangle\" />;\n}\n\nfunction Polygon(\n props: Pick<\n ShapeProps,\n 'smoothing' | 'cornerRounding' | 'verticesCount' | 'style' | 'color' | 'modifiers'\n >\n) {\n return (\n <ShapeNativeView\n {...props}\n // @ts-expect-error\n modifiers={props.modifiers?.map((m) => m.__expo_shared_object_id__)}\n style={props.style}\n type=\"polygon\"\n />\n );\n}\n\nexport const Shape = {\n Star,\n PillStar,\n Pill,\n Circle,\n Rectangle,\n Polygon,\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
import { ViewEvent } from '../../types';
|
|
2
|
+
import { ExpoModifier, ViewEvent } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Colors for slider's core elements.
|
|
5
5
|
* @platform android
|
|
@@ -49,6 +49,8 @@ export type SliderProps = {
|
|
|
49
49
|
* Callback triggered on dragging along the slider.
|
|
50
50
|
*/
|
|
51
51
|
onValueChange?: (value: number) => void;
|
|
52
|
+
/** Modifiers for the component */
|
|
53
|
+
modifiers?: ExpoModifier[];
|
|
52
54
|
};
|
|
53
55
|
type NativeSliderProps = Omit<SliderProps, 'onValueChange'> & ViewEvent<'onValueChanged', {
|
|
54
56
|
value: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Slider/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Slider/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,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index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/Slider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AA+DzC,MAAM,gBAAgB,GAA2C,iBAAiB,CAChF,QAAQ,EACR,YAAY,CACb,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAkB;IACrD,OAAO;QACL,GAAG,KAAK;QACR,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC;QACnB,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC;QACnB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC;QACvB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC;QACvB,cAAc,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;YAC7C,KAAK,EAAE,aAAa,EAAE,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;QACD,aAAa,EAAE,KAAK,CAAC,aAAa;YAChC,CAAC,CAAC,KAAK,CAAC,aAAa;YACrB,CAAC,CAAC,KAAK,CAAC,KAAK;gBACX,CAAC,CAAC;oBACE,UAAU,EAAE,KAAK,CAAC,KAAK;oBACvB,gBAAgB,EAAE,KAAK,CAAC,KAAK;oBAC7B,eAAe,EAAE,KAAK,CAAC,KAAK;iBAC7B;gBACH,CAAC,CAAC,SAAS;QACf,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,mBAAmB;QACnB,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC;KACpE,CAAC;AACJ,CAAC;AAED,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';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport { ExpoModifier, ViewEvent } from '../../types';\n\n/**\n * Colors for slider's core elements.\n * @platform android\n */\nexport type SliderElementColors = {\n thumbColor?: string;\n activeTrackColor?: string;\n inactiveTrackColor?: string;\n activeTickColor?: string;\n inactiveTickColor?: string;\n};\n\nexport type SliderProps = {\n /**\n * Custom styles for the slider component.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * The current value of the slider.\n * @default 0\n */\n value?: number;\n /**\n * The number of steps between the minimum and maximum values, `0` signifies infinite steps.\n * @default 0\n */\n steps?: number;\n /**\n * The minimum value of the slider. Updating this value does not trigger callbacks if the current value is below `min`.\n * @default 0\n */\n min?: number;\n /**\n * The maximum value of the slider. Updating this value does not trigger callbacks if the current value is above `max`.\n * @default 1\n */\n max?: number;\n /**\n * Colors for slider's core elements.\n * @platform android\n */\n elementColors?: SliderElementColors;\n /**\n * Slider color.\n */\n color?: string;\n /**\n * Callback triggered on dragging along the slider.\n */\n onValueChange?: (value: number) => void;\n\n /** Modifiers for the component */\n modifiers?: ExpoModifier[];\n};\n\ntype NativeSliderProps = Omit<SliderProps, 'onValueChange'> &\n ViewEvent<'onValueChanged', { value: number }>;\n\nconst SliderNativeView: React.ComponentType<NativeSliderProps> = requireNativeView(\n 'ExpoUI',\n 'SliderView'\n);\n\n/**\n * @hidden\n */\nexport function transformSliderProps(props: SliderProps): NativeSliderProps {\n return {\n ...props,\n min: props.min ?? 0,\n max: props.max ?? 1,\n steps: props.steps ?? 0,\n value: props.value ?? 0,\n onValueChanged: ({ nativeEvent: { value } }) => {\n props?.onValueChange?.(value);\n },\n elementColors: props.elementColors\n ? props.elementColors\n : props.color\n ? {\n thumbColor: props.color,\n activeTrackColor: props.color,\n activeTickColor: props.color,\n }\n : undefined,\n color: props.color,\n // @ts-expect-error\n modifiers: props.modifiers?.map((m) => m.__expo_shared_object_id__),\n };\n}\n\nexport function Slider(props: SliderProps) {\n return <SliderNativeView {...transformSliderProps(props)} />;\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import { ExpoModifier } from '../../types';
|
|
2
3
|
/**
|
|
3
4
|
* Only for switch.
|
|
4
5
|
*/
|
|
@@ -47,6 +48,8 @@ export type SwitchProps = {
|
|
|
47
48
|
* Picker color. On iOS, it only applies to the `menu` variant.
|
|
48
49
|
*/
|
|
49
50
|
color?: string;
|
|
51
|
+
/** Modifiers for the component */
|
|
52
|
+
modifiers?: ExpoModifier[];
|
|
50
53
|
} & (SwitchSwitchVariantProps | SwitchCheckboxVariantProps | SwitchButtonVariantProps);
|
|
51
54
|
export type SwitchSwitchVariantProps = {
|
|
52
55
|
variant?: 'switch';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Switch/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Switch/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,KAAK,mBAAmB,GAAG;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAGF;;GAEG;AACH,KAAK,qBAAqB,GAAG;IAC3B,YAAY,CAAC,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AAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CAC1E,CAAC;AAyBF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,iBAAiB,CAY1E;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BAExC"}
|
|
@@ -30,6 +30,8 @@ export function transformSwitchProps(props) {
|
|
|
30
30
|
onValueChange: ({ nativeEvent: { value } }) => {
|
|
31
31
|
props?.onValueChange?.(value);
|
|
32
32
|
},
|
|
33
|
+
// @ts-expect-error
|
|
34
|
+
modifiers: props.modifiers?.map((m) => m.__expo_shared_object_id__),
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
export function Switch(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/Switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/Switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AA0FzC,MAAM,gBAAgB,GAA2C,iBAAiB,CAChF,QAAQ,EACR,YAAY,CACb,CAAC;AAEF,SAAS,gBAAgB,CAAC,KAAkB;IAC1C,IAAI,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QACzB,IAAI,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC/B,OAAO;gBACL,iBAAiB,EAAE,KAAK,CAAC,KAAK;aAC/B,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,YAAY,EAAE,KAAK,CAAC,KAAK;aAC1B,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,aAAa,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAkB;IACrD,OAAO;QACL,GAAG,KAAK;QACR,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,QAAQ;QAClC,aAAa,EAAE,gBAAgB,CAAC,KAAK,CAAC;QACtC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,aAAa,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;YAC5C,KAAK,EAAE,aAAa,EAAE,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;QACD,mBAAmB;QACnB,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC;KAC/C,CAAC;AACzB,CAAC;AAED,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';\nimport { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';\n\nimport { ExpoModifier } from '../../types';\n\n// @docsMissing\n/**\n * Only for switch.\n */\ntype SwitchElementColors = {\n checkedThumbColor?: string;\n checkedTrackColor?: string;\n uncheckedThumbColor?: string;\n uncheckedTrackColor?: string;\n};\n\n// @docsMissing\n/**\n * Only for checkbox.\n */\ntype CheckboxElementColors = {\n checkedColor?: string;\n disabledCheckedColor?: string;\n uncheckedColor?: string;\n disabledUncheckedColor?: string;\n checkmarkColor?: string;\n disabledIndeterminateColor?: string;\n};\n\nexport type SwitchProps = {\n /**\n * Indicates whether the switch is checked.\n */\n value: boolean;\n /**\n * Label for the switch.\n *\n * > On Android, the label has an effect only when the `Switch` is used inside a `ContextMenu`.\n */\n label?: string;\n\n /**\n * Type of the switch component. Can be `'checkbox'`, `'switch'`, or `'button'`. The `'button'` style is iOS only.\n * @default 'switch'\n */\n variant?: 'checkbox' | 'switch' | 'button';\n /**\n * Callback function that is called when the checked state changes.\n */\n onValueChange?: (value: boolean) => void;\n /**\n * Optional style for the switch component.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Picker color. On iOS, it only applies to the `menu` variant.\n */\n color?: string;\n\n /** Modifiers for the component */\n modifiers?: ExpoModifier[];\n} & (SwitchSwitchVariantProps | SwitchCheckboxVariantProps | SwitchButtonVariantProps);\n\nexport type SwitchSwitchVariantProps = {\n variant?: 'switch';\n /**\n * Colors for switch's core elements.\n * @platform android\n */\n elementColors?: SwitchElementColors;\n};\n\nexport type SwitchCheckboxVariantProps = {\n variant: 'checkbox';\n /**\n * Colors for checkbox core elements.\n * @platform android\n */\n elementColors?: CheckboxElementColors;\n};\n\nexport type SwitchButtonVariantProps = {\n variant: 'button';\n elementColors?: undefined;\n};\n\ntype NativeSwitchProps = Omit<SwitchProps, 'onValueChange'> & {\n onValueChange: (event: NativeSyntheticEvent<{ value: boolean }>) => void;\n};\n\nconst SwitchNativeView: React.ComponentType<NativeSwitchProps> = requireNativeView(\n 'ExpoUI',\n 'SwitchView'\n);\n\nfunction getElementColors(props: SwitchProps) {\n if (props.variant === 'button') {\n return undefined;\n }\n if (!props.elementColors) {\n if (props.variant === 'switch') {\n return {\n checkedTrackColor: props.color,\n };\n } else {\n return {\n checkedColor: props.color,\n };\n }\n }\n return props.elementColors;\n}\n\n/**\n * @hidden\n */\nexport function transformSwitchProps(props: SwitchProps): NativeSwitchProps {\n return {\n ...props,\n variant: props.variant ?? 'switch',\n elementColors: getElementColors(props),\n color: props.color,\n onValueChange: ({ nativeEvent: { value } }) => {\n props?.onValueChange?.(value);\n },\n // @ts-expect-error\n modifiers: props.modifiers?.map((m) => m.__expo_shared_object_id__),\n } as NativeSwitchProps;\n}\n\nexport function Switch(props: SwitchProps) {\n return <SwitchNativeView {...transformSwitchProps(props)} />;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { ViewEvent } from '../../types';
|
|
3
|
+
import { ExpoModifier, ViewEvent } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* @hidden Not used anywhere yet.
|
|
6
6
|
*/
|
|
@@ -71,6 +71,8 @@ export type TextInputProps = {
|
|
|
71
71
|
* @platform android
|
|
72
72
|
*/
|
|
73
73
|
autoCapitalize?: 'characters' | 'none' | 'sentences' | 'unspecified' | 'words';
|
|
74
|
+
/** Modifiers for the component */
|
|
75
|
+
modifiers?: ExpoModifier[];
|
|
74
76
|
};
|
|
75
77
|
export type NativeTextInputProps = Omit<TextInputProps, 'onChangeText'> & {} & ViewEvent<'onValueChanged', {
|
|
76
78
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/TextInput/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/TextInput/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEjE,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,EACT,SAAS,GACT,eAAe,GACf,SAAS,GACT,WAAW,GACX,eAAe,GACf,KAAK,GACL,aAAa,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,WAAW,GAAG,aAAa,GAAG,OAAO,CAAC;IAE/E,kCAAkC;IAClC,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,SAAS,CACpF,gBAAgB,EAChB;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAClB,CAAC;AAsBJ;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,+BAE9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/TextInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/jetpack-compose/TextInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AA+FzC,wFAAwF;AACxF,MAAM,mBAAmB,GAA8C,iBAAiB,CACtF,QAAQ,EACR,eAAe,CAChB,CAAC;AAEF;;GAEG;AACH,SAAS,uBAAuB,CAAC,KAAqB;IACpD,OAAO;QACL,GAAG,KAAK;QACR,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE;YACxB,KAAK,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAChD,CAAC;QACD,mBAAmB;QACnB,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB,CAAC;KACpE,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,OAAO,CAAC,mBAAmB,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAG,CAAC;AACzF,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport { Ref } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport { ExpoModifier, ViewEvent } from '../../types';\n\n/**\n * @hidden Not used anywhere yet.\n */\nexport type TextInputRole = 'default' | 'cancel' | 'destructive';\n\nexport type TextInputRef = {\n setText: (newText: string) => Promise<void>;\n};\n\nexport type TextInputProps = {\n /**\n * Can be used for imperatively setting text on the TextInput component.\n */\n ref?: Ref<TextInputRef>;\n /**\n * Additional styles to apply to the TextInput.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Initial value that the TextInput displays when being mounted. As the TextInput is an uncontrolled component, change the key prop if you need to change the text value.\n */\n defaultValue?: string;\n /**\n * A callback triggered when user types in text into the TextInput.\n */\n onChangeText: (value: string) => void;\n /**\n * If true, the text input can be multiple lines.\n * While the content will wrap, there's no keyboard button to insert a new line.\n */\n multiline?: boolean;\n /**\n * The number of lines to display when `multiline` is set to true.\n * If the number of lines in the view is above this number, the view scrolls.\n * @default undefined, which means unlimited lines.\n */\n numberOfLines?: number;\n /**\n * Determines which keyboard to open. For example, `'numeric'`.\n *\n * Available options:\n * - default\n * - numeric\n * - email-address\n * - phone-pad\n * - decimal-pad\n * - ascii-capable\n * - url\n * - password\n * - password-numeric\n *\n * @default default\n */\n keyboardType?:\n | 'default'\n | 'email-address'\n | 'numeric'\n | 'phone-pad'\n | 'ascii-capable'\n | 'url'\n | 'decimal-pad';\n /**\n * If true, autocorrection is enabled.\n * @default true\n */\n autocorrection?: boolean;\n /**\n * Options to request software keyboard to capitalize the text. Applies to languages which has upper-case and lower-case letters.\n *\n * Available options:\n * - `characters`: Capitalize all characters.\n * - `none`: Do not auto-capitalize text.\n * - `sentences`: Capitalize the first character of each sentence.\n * - `unspecified`: Capitalization behavior is not specified.\n * - `words`: Capitalize the first character of every word.\n * @default none\n * @platform android\n */\n autoCapitalize?: 'characters' | 'none' | 'sentences' | 'unspecified' | 'words';\n\n /** Modifiers for the component */\n modifiers?: ExpoModifier[];\n};\n\nexport type NativeTextInputProps = Omit<TextInputProps, '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 TextInputNativeView: React.ComponentType<NativeTextInputProps> = requireNativeView(\n 'ExpoUI',\n 'TextInputView'\n);\n\n/**\n * @hidden\n */\nfunction transformTextInputProps(props: TextInputProps): NativeTextInputProps {\n return {\n ...props,\n onValueChanged: (event) => {\n props.onChangeText?.(event.nativeEvent.value);\n },\n // @ts-expect-error\n modifiers: props.modifiers?.map((m) => m.__expo_shared_object_id__),\n };\n}\n\n/**\n * Renders a `TextInput` component.\n */\nexport function TextInput(props: TextInputProps) {\n return <TextInputNativeView {...transformTextInputProps(props)} style={props.style} />;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/jetpack-compose/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/jetpack-compose/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC","sourcesContent":["export * from './AlertDialog';\nexport * from './Button';\nexport * from './ContextMenu';\nexport * from './DatePicker';\nexport * from './Picker';\nexport * from './Progress';\nexport * from './Slider';\nexport * from './Switch';\nexport * from './TextInput';\nexport * from './Shape';\nexport * from './modifiers';\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ExpoModifier } from '../types';
|
|
2
|
+
export declare const padding: (all: number) => ExpoModifier;
|
|
3
|
+
export declare const size: (width: number, height: number) => ExpoModifier;
|
|
4
|
+
export declare const fillMaxSize: () => ExpoModifier;
|
|
5
|
+
export declare const offset: (x: number, y: number) => ExpoModifier;
|
|
6
|
+
export declare const background: (color: string) => ExpoModifier;
|
|
7
|
+
export declare const border: (borderWidth: number, borderColor: string) => ExpoModifier;
|
|
8
|
+
export declare const shadow: (elevation: number) => ExpoModifier;
|
|
9
|
+
export declare const alpha: (alpha: number) => ExpoModifier;
|
|
10
|
+
export declare const blur: (radius: number) => ExpoModifier;
|
|
11
|
+
export declare const clickable: (callback: () => void) => ExpoModifier;
|
|
12
|
+
export declare const rotate: (degrees: number) => ExpoModifier;
|
|
13
|
+
export declare const zIndex: (index: number) => ExpoModifier;
|
|
14
|
+
//# sourceMappingURL=modifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../../src/jetpack-compose/modifiers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,eAAO,MAAM,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,YAAyC,CAAC;AACjF,eAAO,MAAM,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,YAAsC,CAAC;AAC7F,eAAO,MAAM,WAAW,EAAE,MAAM,YAA6C,CAAC;AAC9E,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,YAAwC,CAAC;AACxF,eAAO,MAAM,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,YAA4C,CAAC;AACzF,eAAO,MAAM,MAAM,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,YACxC,CAAC;AAC5B,eAAO,MAAM,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,YAAwC,CAAC;AACrF,eAAO,MAAM,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,YAAuC,CAAC;AAC/E,eAAO,MAAM,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAsC,CAAC;AAC9E,eAAO,MAAM,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,YAA2C,CAAC;AAC9F,eAAO,MAAM,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,YAAwC,CAAC;AACnF,eAAO,MAAM,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,YAAwC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { requireNativeModule } from 'expo';
|
|
2
|
+
const nativeExpoUIModule = requireNativeModule('ExpoUI');
|
|
3
|
+
export const padding = nativeExpoUIModule.padding;
|
|
4
|
+
export const size = nativeExpoUIModule.size;
|
|
5
|
+
export const fillMaxSize = nativeExpoUIModule.fillMaxSize;
|
|
6
|
+
export const offset = nativeExpoUIModule.offset;
|
|
7
|
+
export const background = nativeExpoUIModule.background;
|
|
8
|
+
export const border = nativeExpoUIModule.border;
|
|
9
|
+
export const shadow = nativeExpoUIModule.shadow;
|
|
10
|
+
export const alpha = nativeExpoUIModule.alpha;
|
|
11
|
+
export const blur = nativeExpoUIModule.blur;
|
|
12
|
+
export const clickable = nativeExpoUIModule.clickable;
|
|
13
|
+
export const rotate = nativeExpoUIModule.rotate;
|
|
14
|
+
export const zIndex = nativeExpoUIModule.zIndex;
|
|
15
|
+
//# sourceMappingURL=modifiers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modifiers.js","sourceRoot":"","sources":["../../src/jetpack-compose/modifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAI3C,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAEzD,MAAM,CAAC,MAAM,OAAO,GAAkC,kBAAkB,CAAC,OAAO,CAAC;AACjF,MAAM,CAAC,MAAM,IAAI,GAAoD,kBAAkB,CAAC,IAAI,CAAC;AAC7F,MAAM,CAAC,MAAM,WAAW,GAAuB,kBAAkB,CAAC,WAAW,CAAC;AAC9E,MAAM,CAAC,MAAM,MAAM,GAA2C,kBAAkB,CAAC,MAAM,CAAC;AACxF,MAAM,CAAC,MAAM,UAAU,GAAoC,kBAAkB,CAAC,UAAU,CAAC;AACzF,MAAM,CAAC,MAAM,MAAM,GACjB,kBAAkB,CAAC,MAAM,CAAC;AAC5B,MAAM,CAAC,MAAM,MAAM,GAAwC,kBAAkB,CAAC,MAAM,CAAC;AACrF,MAAM,CAAC,MAAM,KAAK,GAAoC,kBAAkB,CAAC,KAAK,CAAC;AAC/E,MAAM,CAAC,MAAM,IAAI,GAAqC,kBAAkB,CAAC,IAAI,CAAC;AAC9E,MAAM,CAAC,MAAM,SAAS,GAA2C,kBAAkB,CAAC,SAAS,CAAC;AAC9F,MAAM,CAAC,MAAM,MAAM,GAAsC,kBAAkB,CAAC,MAAM,CAAC;AACnF,MAAM,CAAC,MAAM,MAAM,GAAoC,kBAAkB,CAAC,MAAM,CAAC","sourcesContent":["import { requireNativeModule } from 'expo';\n\nimport { ExpoModifier } from '../types';\n\nconst nativeExpoUIModule = requireNativeModule('ExpoUI');\n\nexport const padding: (all: number) => ExpoModifier = nativeExpoUIModule.padding;\nexport const size: (width: number, height: number) => ExpoModifier = nativeExpoUIModule.size;\nexport const fillMaxSize: () => ExpoModifier = nativeExpoUIModule.fillMaxSize;\nexport const offset: (x: number, y: number) => ExpoModifier = nativeExpoUIModule.offset;\nexport const background: (color: string) => ExpoModifier = nativeExpoUIModule.background;\nexport const border: (borderWidth: number, borderColor: string) => ExpoModifier =\n nativeExpoUIModule.border;\nexport const shadow: (elevation: number) => ExpoModifier = nativeExpoUIModule.shadow;\nexport const alpha: (alpha: number) => ExpoModifier = nativeExpoUIModule.alpha;\nexport const blur: (radius: number) => ExpoModifier = nativeExpoUIModule.blur;\nexport const clickable: (callback: () => void) => ExpoModifier = nativeExpoUIModule.clickable;\nexport const rotate: (degrees: number) => ExpoModifier = nativeExpoUIModule.rotate;\nexport const zIndex: (index: number) => ExpoModifier = nativeExpoUIModule.zIndex;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type CommonViewModifierProps } from '../types';
|
|
2
2
|
export type BottomSheetProps = {
|
|
3
3
|
/**
|
|
4
4
|
* The children of the `BottomSheet` component.
|
|
@@ -12,18 +12,6 @@ export type BottomSheetProps = {
|
|
|
12
12
|
* Callback function that is called when the `BottomSheet` is opened.
|
|
13
13
|
*/
|
|
14
14
|
onIsOpenedChange: (isOpened: boolean) => void;
|
|
15
|
-
};
|
|
16
|
-
type NativeBottomSheetProps = Omit<BottomSheetProps, 'onIsOpenedChange'> & {
|
|
17
|
-
onIsOpenedChange: (event: NativeSyntheticEvent<{
|
|
18
|
-
isOpened: boolean;
|
|
19
|
-
}>) => void;
|
|
20
|
-
};
|
|
21
|
-
export declare function transformBottomSheetProps(props: BottomSheetProps): NativeBottomSheetProps;
|
|
22
|
-
/**
|
|
23
|
-
* `<BottomSheet>` component without a host view.
|
|
24
|
-
* You should use this with a `Host` component in ancestor.
|
|
25
|
-
*/
|
|
26
|
-
export declare function BottomSheetPrimitive(props: BottomSheetProps): import("react").JSX.Element;
|
|
15
|
+
} & CommonViewModifierProps;
|
|
27
16
|
export declare function BottomSheet(props: BottomSheetProps): import("react").JSX.Element;
|
|
28
|
-
export {};
|
|
29
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/BottomSheet/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/swift-ui/BottomSheet/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C,GAAG,uBAAuB,CAAC;AAuB5B,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAElD"}
|