@draftbit/core 47.0.0-cb6590.2 → 47.0.0-eae99e.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/lib/commonjs/Provider.js.map +1 -1
- package/lib/commonjs/components/Accordion/AccordionGroup.js.map +1 -1
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/Accordion/index.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheet.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/index.js.map +1 -1
- package/lib/commonjs/components/Banner.js.map +1 -1
- package/lib/commonjs/components/Button.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/context.js.map +1 -1
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/Elevation.js.map +1 -1
- package/lib/commonjs/components/FormRow.js.map +1 -1
- package/lib/commonjs/components/IconButton.js.map +1 -1
- package/lib/commonjs/components/Layout.js.map +1 -1
- package/lib/commonjs/components/NumberInput.js.map +1 -1
- package/lib/commonjs/components/Picker/Picker.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerTypes.js.map +1 -1
- package/lib/commonjs/components/Portal/Portal.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalConsumer.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalHost.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalManager.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/components/RadioButton/context.js.map +1 -1
- package/lib/commonjs/components/RadioButton/index.js.map +1 -1
- package/lib/commonjs/components/SVG.js.map +1 -1
- package/lib/commonjs/components/ScreenContainer.js.map +1 -1
- package/lib/commonjs/components/Slider.js.map +1 -1
- package/lib/commonjs/components/StarRating.js.map +1 -1
- package/lib/commonjs/components/Stepper.js.map +1 -1
- package/lib/commonjs/components/Surface.js.map +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/commonjs/components/Swiper/index.js.map +1 -1
- package/lib/commonjs/components/Switch.js.map +1 -1
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/components/TextField.js.map +1 -1
- package/lib/commonjs/components/Touchable.js.map +1 -1
- package/lib/commonjs/components/Touchable.web.js.map +1 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/hooks.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/interfaces/Icon.js.map +1 -1
- package/lib/commonjs/mappings/Accordion.js.map +1 -1
- package/lib/commonjs/mappings/AccordionItem.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheet.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/mappings/ActivityIndicator.js.map +1 -1
- package/lib/commonjs/mappings/AudioPlayer.js.map +1 -1
- package/lib/commonjs/mappings/BlurView.js.map +1 -1
- package/lib/commonjs/mappings/Button.js.map +1 -1
- package/lib/commonjs/mappings/Checkbox.js.map +1 -1
- package/lib/commonjs/mappings/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/mappings/CheckboxRow.js.map +1 -1
- package/lib/commonjs/mappings/CustomCode.js.map +1 -1
- package/lib/commonjs/mappings/DatePicker.js.map +1 -1
- package/lib/commonjs/mappings/Fetch.js.map +1 -1
- package/lib/commonjs/mappings/FlashList.js.map +1 -1
- package/lib/commonjs/mappings/FlatList.js.map +1 -1
- package/lib/commonjs/mappings/Icon.js.map +1 -1
- package/lib/commonjs/mappings/IconButton.js.map +1 -1
- package/lib/commonjs/mappings/Image.js.map +1 -1
- package/lib/commonjs/mappings/ImageBackground.js.map +1 -1
- package/lib/commonjs/mappings/KeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +1 -1
- package/lib/commonjs/mappings/Layout.js.map +1 -1
- package/lib/commonjs/mappings/LinearGradient.js.map +1 -1
- package/lib/commonjs/mappings/MapCallout.js.map +1 -1
- package/lib/commonjs/mappings/MapMarker.js.map +1 -1
- package/lib/commonjs/mappings/MapView.js.map +1 -1
- package/lib/commonjs/mappings/Modal.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout/AspectRatio.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout/Box.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout/Center.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout/Column.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout/Container.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout/Row.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout/Stack.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout/ZStack.js.map +1 -1
- package/lib/commonjs/mappings/NumberInput.js.map +1 -1
- package/lib/commonjs/mappings/Picker.js.map +1 -1
- package/lib/commonjs/mappings/RadioButton.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/SVG.js.map +1 -1
- package/lib/commonjs/mappings/SafeAreaView.js.map +1 -1
- package/lib/commonjs/mappings/ScrollView.js.map +1 -1
- package/lib/commonjs/mappings/Slider.js.map +1 -1
- package/lib/commonjs/mappings/StarRating.js.map +1 -1
- package/lib/commonjs/mappings/Stepper.js.map +1 -1
- package/lib/commonjs/mappings/Surface.js.map +1 -1
- package/lib/commonjs/mappings/Swiper.js.map +1 -1
- package/lib/commonjs/mappings/SwiperItem.js.map +1 -1
- package/lib/commonjs/mappings/Switch.js.map +1 -1
- package/lib/commonjs/mappings/Text.js.map +1 -1
- package/lib/commonjs/mappings/TextArea.js.map +1 -1
- package/lib/commonjs/mappings/TextField.js.map +1 -1
- package/lib/commonjs/mappings/TextInput.js.map +1 -1
- package/lib/commonjs/mappings/Touchable.js.map +1 -1
- package/lib/commonjs/mappings/Video.js.map +1 -1
- package/lib/commonjs/mappings/View.js.map +1 -1
- package/lib/commonjs/mappings/WebView.js.map +1 -1
- package/lib/commonjs/styles/DarkTheme.js.map +1 -1
- package/lib/commonjs/styles/DefaultTheme.js.map +1 -1
- package/lib/commonjs/styles/fonts.js.map +1 -1
- package/lib/commonjs/styles/overlay.js.map +1 -1
- package/lib/commonjs/styles/shadow.js.map +1 -1
- package/lib/commonjs/theming.js.map +1 -1
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/Provider.js.map +1 -1
- package/lib/module/components/Accordion/AccordionGroup.js.map +1 -1
- package/lib/module/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/module/components/Accordion/index.js.map +1 -1
- package/lib/module/components/ActionSheet/ActionSheet.js.map +1 -1
- package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/module/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/module/components/ActionSheet/index.js.map +1 -1
- package/lib/module/components/Banner.js.map +1 -1
- package/lib/module/components/Button.js.map +1 -1
- package/lib/module/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/module/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/module/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/module/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/module/components/Checkbox/context.js.map +1 -1
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Config.js.map +1 -1
- package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/module/components/DeprecatedButton.js.map +1 -1
- package/lib/module/components/Elevation.js.map +1 -1
- package/lib/module/components/FormRow.js.map +1 -1
- package/lib/module/components/IconButton.js.map +1 -1
- package/lib/module/components/Layout.js.map +1 -1
- package/lib/module/components/NumberInput.js.map +1 -1
- package/lib/module/components/Picker/Picker.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.android.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.web.js.map +1 -1
- package/lib/module/components/Picker/PickerTypes.js.map +1 -1
- package/lib/module/components/Portal/Portal.js.map +1 -1
- package/lib/module/components/Portal/PortalConsumer.js.map +1 -1
- package/lib/module/components/Portal/PortalHost.js.map +1 -1
- package/lib/module/components/Portal/PortalManager.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/module/components/RadioButton/context.js.map +1 -1
- package/lib/module/components/RadioButton/index.js.map +1 -1
- package/lib/module/components/SVG.js.map +1 -1
- package/lib/module/components/ScreenContainer.js.map +1 -1
- package/lib/module/components/Slider.js.map +1 -1
- package/lib/module/components/StarRating.js +4 -23
- package/lib/module/components/StarRating.js.map +1 -1
- package/lib/module/components/Stepper.js.map +1 -1
- package/lib/module/components/Surface.js.map +1 -1
- package/lib/module/components/Swiper/Swiper.js.map +1 -1
- package/lib/module/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/module/components/Swiper/index.js.map +1 -1
- package/lib/module/components/Switch.js.map +1 -1
- package/lib/module/components/Text.js.map +1 -1
- package/lib/module/components/TextField.js.map +1 -1
- package/lib/module/components/Touchable.js.map +1 -1
- package/lib/module/components/Touchable.web.js.map +1 -1
- package/lib/module/constants.js.map +1 -1
- package/lib/module/hooks.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/interfaces/Icon.js.map +1 -1
- package/lib/module/mappings/Accordion.js.map +1 -1
- package/lib/module/mappings/AccordionItem.js.map +1 -1
- package/lib/module/mappings/ActionSheet.js.map +1 -1
- package/lib/module/mappings/ActionSheetCancel.js.map +1 -1
- package/lib/module/mappings/ActionSheetItem.js.map +1 -1
- package/lib/module/mappings/ActivityIndicator.js.map +1 -1
- package/lib/module/mappings/AudioPlayer.js.map +1 -1
- package/lib/module/mappings/BlurView.js.map +1 -1
- package/lib/module/mappings/Button.js.map +1 -1
- package/lib/module/mappings/Checkbox.js.map +1 -1
- package/lib/module/mappings/CheckboxGroup.js.map +1 -1
- package/lib/module/mappings/CheckboxRow.js.map +1 -1
- package/lib/module/mappings/CustomCode.js.map +1 -1
- package/lib/module/mappings/DatePicker.js.map +1 -1
- package/lib/module/mappings/Fetch.js.map +1 -1
- package/lib/module/mappings/FlashList.js.map +1 -1
- package/lib/module/mappings/FlatList.js.map +1 -1
- package/lib/module/mappings/Icon.js.map +1 -1
- package/lib/module/mappings/IconButton.js.map +1 -1
- package/lib/module/mappings/Image.js.map +1 -1
- package/lib/module/mappings/ImageBackground.js.map +1 -1
- package/lib/module/mappings/KeyboardAvoidingView.js.map +1 -1
- package/lib/module/mappings/KeyboardAwareScrollView.js.map +1 -1
- package/lib/module/mappings/Layout.js.map +1 -1
- package/lib/module/mappings/LinearGradient.js.map +1 -1
- package/lib/module/mappings/MapCallout.js.map +1 -1
- package/lib/module/mappings/MapMarker.js.map +1 -1
- package/lib/module/mappings/MapView.js.map +1 -1
- package/lib/module/mappings/Modal.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout/AspectRatio.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout/Box.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout/Center.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout/Column.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout/Container.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout/Row.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout/Stack.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout/ZStack.js.map +1 -1
- package/lib/module/mappings/NumberInput.js.map +1 -1
- package/lib/module/mappings/Picker.js.map +1 -1
- package/lib/module/mappings/RadioButton.js.map +1 -1
- package/lib/module/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/module/mappings/RadioButtonRow.js.map +1 -1
- package/lib/module/mappings/SVG.js.map +1 -1
- package/lib/module/mappings/SafeAreaView.js.map +1 -1
- package/lib/module/mappings/ScrollView.js.map +1 -1
- package/lib/module/mappings/Slider.js.map +1 -1
- package/lib/module/mappings/StarRating.js.map +1 -1
- package/lib/module/mappings/Stepper.js.map +1 -1
- package/lib/module/mappings/Surface.js.map +1 -1
- package/lib/module/mappings/Swiper.js.map +1 -1
- package/lib/module/mappings/SwiperItem.js.map +1 -1
- package/lib/module/mappings/Switch.js.map +1 -1
- package/lib/module/mappings/Text.js.map +1 -1
- package/lib/module/mappings/TextArea.js.map +1 -1
- package/lib/module/mappings/TextField.js.map +1 -1
- package/lib/module/mappings/TextInput.js.map +1 -1
- package/lib/module/mappings/Touchable.js.map +1 -1
- package/lib/module/mappings/Video.js.map +1 -1
- package/lib/module/mappings/View.js.map +1 -1
- package/lib/module/mappings/WebView.js.map +1 -1
- package/lib/module/styles/DarkTheme.js.map +1 -1
- package/lib/module/styles/DefaultTheme.js.map +1 -1
- package/lib/module/styles/fonts.js.map +1 -1
- package/lib/module/styles/overlay.js.map +1 -1
- package/lib/module/styles/shadow.js.map +1 -1
- package/lib/module/theming.js.map +1 -1
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/Provider.d.ts +1 -2
- package/lib/typescript/src/components/Accordion/AccordionGroup.d.ts +1 -2
- package/lib/typescript/src/components/Accordion/AccordionItem.d.ts +1 -2
- package/lib/typescript/src/components/Accordion/index.d.ts +0 -1
- package/lib/typescript/src/components/ActionSheet/ActionSheet.d.ts +0 -1
- package/lib/typescript/src/components/ActionSheet/ActionSheetCancel.d.ts +1 -2
- package/lib/typescript/src/components/ActionSheet/ActionSheetItem.d.ts +1 -2
- package/lib/typescript/src/components/ActionSheet/index.d.ts +0 -1
- package/lib/typescript/src/components/Banner.d.ts +1 -2
- package/lib/typescript/src/components/Button.d.ts +0 -1
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +0 -1
- package/lib/typescript/src/components/Checkbox/CheckboxGroup.d.ts +0 -1
- package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts +0 -1
- package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts +0 -1
- package/lib/typescript/src/components/Checkbox/context.d.ts +0 -1
- package/lib/typescript/src/components/Checkbox/index.d.ts +0 -1
- package/lib/typescript/src/components/Config.d.ts +0 -1
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +1 -2
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.d.ts +0 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.d.ts +0 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponentType.d.ts +0 -1
- package/lib/typescript/src/components/DeprecatedButton.d.ts +1 -2
- package/lib/typescript/src/components/Elevation.d.ts +1 -2
- package/lib/typescript/src/components/FormRow.d.ts +1 -2
- package/lib/typescript/src/components/IconButton.d.ts +1 -2
- package/lib/typescript/src/components/Layout.d.ts +0 -1
- package/lib/typescript/src/components/NumberInput.d.ts +0 -1
- package/lib/typescript/src/components/Picker/Picker.d.ts +1 -2
- package/lib/typescript/src/components/Picker/PickerComponent.android.d.ts +0 -1
- package/lib/typescript/src/components/Picker/PickerComponent.ios.d.ts +0 -1
- package/lib/typescript/src/components/Picker/PickerComponent.web.d.ts +0 -1
- package/lib/typescript/src/components/Picker/PickerTypes.d.ts +0 -1
- package/lib/typescript/src/components/Portal/Portal.d.ts +1 -2
- package/lib/typescript/src/components/Portal/PortalConsumer.d.ts +1 -2
- package/lib/typescript/src/components/Portal/PortalHost.d.ts +2 -3
- package/lib/typescript/src/components/Portal/PortalManager.d.ts +1 -2
- package/lib/typescript/src/components/RadioButton/RadioButton.d.ts +1 -2
- package/lib/typescript/src/components/RadioButton/RadioButtonFieldGroup.d.ts +0 -1
- package/lib/typescript/src/components/RadioButton/RadioButtonGroup.d.ts +0 -1
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.d.ts +0 -1
- package/lib/typescript/src/components/RadioButton/context.d.ts +0 -1
- package/lib/typescript/src/components/RadioButton/index.d.ts +0 -1
- package/lib/typescript/src/components/SVG.d.ts +1 -2
- package/lib/typescript/src/components/ScreenContainer.d.ts +1 -2
- package/lib/typescript/src/components/Slider.d.ts +1 -2
- package/lib/typescript/src/components/StarRating.d.ts +1 -2
- package/lib/typescript/src/components/Stepper.d.ts +1 -2
- package/lib/typescript/src/components/Surface.d.ts +1 -2
- package/lib/typescript/src/components/Swiper/Swiper.d.ts +0 -1
- package/lib/typescript/src/components/Swiper/SwiperItem.d.ts +0 -1
- package/lib/typescript/src/components/Swiper/index.d.ts +0 -1
- package/lib/typescript/src/components/Switch.d.ts +2 -3
- package/lib/typescript/src/components/Text.d.ts +1 -2
- package/lib/typescript/src/components/TextField.d.ts +1 -2
- package/lib/typescript/src/components/Touchable.d.ts +1 -2
- package/lib/typescript/src/components/Touchable.web.d.ts +0 -1
- package/lib/typescript/src/constants.d.ts +0 -1
- package/lib/typescript/src/hooks.d.ts +0 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/interfaces/Icon.d.ts +2 -3
- package/lib/typescript/src/mappings/Accordion.d.ts +0 -1
- package/lib/typescript/src/mappings/AccordionItem.d.ts +0 -1
- package/lib/typescript/src/mappings/ActionSheet.d.ts +0 -1
- package/lib/typescript/src/mappings/ActionSheetCancel.d.ts +0 -1
- package/lib/typescript/src/mappings/ActionSheetItem.d.ts +0 -1
- package/lib/typescript/src/mappings/ActivityIndicator.d.ts +0 -1
- package/lib/typescript/src/mappings/AudioPlayer.d.ts +0 -1
- package/lib/typescript/src/mappings/BlurView.d.ts +0 -1
- package/lib/typescript/src/mappings/Button.d.ts +0 -1
- package/lib/typescript/src/mappings/Checkbox.d.ts +0 -1
- package/lib/typescript/src/mappings/CheckboxGroup.d.ts +0 -1
- package/lib/typescript/src/mappings/CheckboxRow.d.ts +0 -1
- package/lib/typescript/src/mappings/CustomCode.d.ts +0 -1
- package/lib/typescript/src/mappings/DatePicker.d.ts +0 -1
- package/lib/typescript/src/mappings/Fetch.d.ts +0 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +0 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +0 -1
- package/lib/typescript/src/mappings/Icon.d.ts +0 -1
- package/lib/typescript/src/mappings/IconButton.d.ts +0 -1
- package/lib/typescript/src/mappings/Image.d.ts +0 -1
- package/lib/typescript/src/mappings/ImageBackground.d.ts +0 -1
- package/lib/typescript/src/mappings/KeyboardAvoidingView.d.ts +0 -1
- package/lib/typescript/src/mappings/KeyboardAwareScrollView.d.ts +0 -1
- package/lib/typescript/src/mappings/Layout.d.ts +0 -1
- package/lib/typescript/src/mappings/LinearGradient.d.ts +0 -1
- package/lib/typescript/src/mappings/MapCallout.d.ts +0 -1
- package/lib/typescript/src/mappings/MapMarker.d.ts +0 -1
- package/lib/typescript/src/mappings/MapView.d.ts +0 -1
- package/lib/typescript/src/mappings/Modal.d.ts +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/AspectRatio.d.ts +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Box.d.ts +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Center.d.ts +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Column.d.ts +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Container.d.ts +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Row.d.ts +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Stack.d.ts +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/ZStack.d.ts +0 -1
- package/lib/typescript/src/mappings/NumberInput.d.ts +0 -1
- package/lib/typescript/src/mappings/Picker.d.ts +0 -1
- package/lib/typescript/src/mappings/RadioButton.d.ts +0 -1
- package/lib/typescript/src/mappings/RadioButtonGroup.d.ts +0 -1
- package/lib/typescript/src/mappings/RadioButtonRow.d.ts +0 -1
- package/lib/typescript/src/mappings/SVG.d.ts +0 -1
- package/lib/typescript/src/mappings/SafeAreaView.d.ts +0 -1
- package/lib/typescript/src/mappings/ScrollView.d.ts +0 -1
- package/lib/typescript/src/mappings/Slider.d.ts +0 -1
- package/lib/typescript/src/mappings/StarRating.d.ts +0 -1
- package/lib/typescript/src/mappings/Stepper.d.ts +0 -1
- package/lib/typescript/src/mappings/Surface.d.ts +0 -1
- package/lib/typescript/src/mappings/Swiper.d.ts +0 -1
- package/lib/typescript/src/mappings/SwiperItem.d.ts +0 -1
- package/lib/typescript/src/mappings/Switch.d.ts +0 -1
- package/lib/typescript/src/mappings/Text.d.ts +0 -1
- package/lib/typescript/src/mappings/TextArea.d.ts +0 -1
- package/lib/typescript/src/mappings/TextField.d.ts +0 -1
- package/lib/typescript/src/mappings/TextInput.d.ts +0 -1
- package/lib/typescript/src/mappings/Touchable.d.ts +0 -1
- package/lib/typescript/src/mappings/Video.d.ts +0 -1
- package/lib/typescript/src/mappings/View.d.ts +0 -1
- package/lib/typescript/src/mappings/WebView.d.ts +0 -1
- package/lib/typescript/src/styles/DarkTheme.d.ts +0 -1
- package/lib/typescript/src/styles/DefaultTheme.d.ts +1 -2
- package/lib/typescript/src/styles/fonts.d.ts +0 -1
- package/lib/typescript/src/styles/overlay.d.ts +0 -1
- package/lib/typescript/src/styles/shadow.d.ts +0 -1
- package/lib/typescript/src/theming.d.ts +0 -1
- package/lib/typescript/src/utilities.d.ts +0 -1
- package/package.json +3 -3
- package/lib/typescript/src/Provider.d.ts.map +0 -1
- package/lib/typescript/src/components/Accordion/AccordionGroup.d.ts.map +0 -1
- package/lib/typescript/src/components/Accordion/AccordionItem.d.ts.map +0 -1
- package/lib/typescript/src/components/Accordion/index.d.ts.map +0 -1
- package/lib/typescript/src/components/ActionSheet/ActionSheet.d.ts.map +0 -1
- package/lib/typescript/src/components/ActionSheet/ActionSheetCancel.d.ts.map +0 -1
- package/lib/typescript/src/components/ActionSheet/ActionSheetItem.d.ts.map +0 -1
- package/lib/typescript/src/components/ActionSheet/index.d.ts.map +0 -1
- package/lib/typescript/src/components/Banner.d.ts.map +0 -1
- package/lib/typescript/src/components/Button.d.ts.map +0 -1
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +0 -1
- package/lib/typescript/src/components/Checkbox/CheckboxGroup.d.ts.map +0 -1
- package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts.map +0 -1
- package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts.map +0 -1
- package/lib/typescript/src/components/Checkbox/context.d.ts.map +0 -1
- package/lib/typescript/src/components/Checkbox/index.d.ts.map +0 -1
- package/lib/typescript/src/components/Config.d.ts.map +0 -1
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts.map +0 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.d.ts.map +0 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.d.ts.map +0 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponentType.d.ts.map +0 -1
- package/lib/typescript/src/components/DeprecatedButton.d.ts.map +0 -1
- package/lib/typescript/src/components/Elevation.d.ts.map +0 -1
- package/lib/typescript/src/components/FormRow.d.ts.map +0 -1
- package/lib/typescript/src/components/IconButton.d.ts.map +0 -1
- package/lib/typescript/src/components/Layout.d.ts.map +0 -1
- package/lib/typescript/src/components/NumberInput.d.ts.map +0 -1
- package/lib/typescript/src/components/Picker/Picker.d.ts.map +0 -1
- package/lib/typescript/src/components/Picker/PickerComponent.android.d.ts.map +0 -1
- package/lib/typescript/src/components/Picker/PickerComponent.ios.d.ts.map +0 -1
- package/lib/typescript/src/components/Picker/PickerComponent.web.d.ts.map +0 -1
- package/lib/typescript/src/components/Picker/PickerTypes.d.ts.map +0 -1
- package/lib/typescript/src/components/Portal/Portal.d.ts.map +0 -1
- package/lib/typescript/src/components/Portal/PortalConsumer.d.ts.map +0 -1
- package/lib/typescript/src/components/Portal/PortalHost.d.ts.map +0 -1
- package/lib/typescript/src/components/Portal/PortalManager.d.ts.map +0 -1
- package/lib/typescript/src/components/RadioButton/RadioButton.d.ts.map +0 -1
- package/lib/typescript/src/components/RadioButton/RadioButtonFieldGroup.d.ts.map +0 -1
- package/lib/typescript/src/components/RadioButton/RadioButtonGroup.d.ts.map +0 -1
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.d.ts.map +0 -1
- package/lib/typescript/src/components/RadioButton/context.d.ts.map +0 -1
- package/lib/typescript/src/components/RadioButton/index.d.ts.map +0 -1
- package/lib/typescript/src/components/SVG.d.ts.map +0 -1
- package/lib/typescript/src/components/ScreenContainer.d.ts.map +0 -1
- package/lib/typescript/src/components/Slider.d.ts.map +0 -1
- package/lib/typescript/src/components/StarRating.d.ts.map +0 -1
- package/lib/typescript/src/components/Stepper.d.ts.map +0 -1
- package/lib/typescript/src/components/Surface.d.ts.map +0 -1
- package/lib/typescript/src/components/Swiper/Swiper.d.ts.map +0 -1
- package/lib/typescript/src/components/Swiper/SwiperItem.d.ts.map +0 -1
- package/lib/typescript/src/components/Swiper/index.d.ts.map +0 -1
- package/lib/typescript/src/components/Switch.d.ts.map +0 -1
- package/lib/typescript/src/components/Text.d.ts.map +0 -1
- package/lib/typescript/src/components/TextField.d.ts.map +0 -1
- package/lib/typescript/src/components/Touchable.d.ts.map +0 -1
- package/lib/typescript/src/components/Touchable.web.d.ts.map +0 -1
- package/lib/typescript/src/constants.d.ts.map +0 -1
- package/lib/typescript/src/hooks.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/Icon.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Accordion.d.ts.map +0 -1
- package/lib/typescript/src/mappings/AccordionItem.d.ts.map +0 -1
- package/lib/typescript/src/mappings/ActionSheet.d.ts.map +0 -1
- package/lib/typescript/src/mappings/ActionSheetCancel.d.ts.map +0 -1
- package/lib/typescript/src/mappings/ActionSheetItem.d.ts.map +0 -1
- package/lib/typescript/src/mappings/ActivityIndicator.d.ts.map +0 -1
- package/lib/typescript/src/mappings/AudioPlayer.d.ts.map +0 -1
- package/lib/typescript/src/mappings/BlurView.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Button.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Checkbox.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CheckboxGroup.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CheckboxRow.d.ts.map +0 -1
- package/lib/typescript/src/mappings/CustomCode.d.ts.map +0 -1
- package/lib/typescript/src/mappings/DatePicker.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Fetch.d.ts.map +0 -1
- package/lib/typescript/src/mappings/FlashList.d.ts.map +0 -1
- package/lib/typescript/src/mappings/FlatList.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Icon.d.ts.map +0 -1
- package/lib/typescript/src/mappings/IconButton.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Image.d.ts.map +0 -1
- package/lib/typescript/src/mappings/ImageBackground.d.ts.map +0 -1
- package/lib/typescript/src/mappings/KeyboardAvoidingView.d.ts.map +0 -1
- package/lib/typescript/src/mappings/KeyboardAwareScrollView.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Layout.d.ts.map +0 -1
- package/lib/typescript/src/mappings/LinearGradient.d.ts.map +0 -1
- package/lib/typescript/src/mappings/MapCallout.d.ts.map +0 -1
- package/lib/typescript/src/mappings/MapMarker.d.ts.map +0 -1
- package/lib/typescript/src/mappings/MapView.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Modal.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/AspectRatio.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Box.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Center.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Column.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Container.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Row.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/Stack.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout/ZStack.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NumberInput.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Picker.d.ts.map +0 -1
- package/lib/typescript/src/mappings/RadioButton.d.ts.map +0 -1
- package/lib/typescript/src/mappings/RadioButtonGroup.d.ts.map +0 -1
- package/lib/typescript/src/mappings/RadioButtonRow.d.ts.map +0 -1
- package/lib/typescript/src/mappings/SVG.d.ts.map +0 -1
- package/lib/typescript/src/mappings/SafeAreaView.d.ts.map +0 -1
- package/lib/typescript/src/mappings/ScrollView.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Slider.d.ts.map +0 -1
- package/lib/typescript/src/mappings/StarRating.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Stepper.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Surface.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Swiper.d.ts.map +0 -1
- package/lib/typescript/src/mappings/SwiperItem.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Switch.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Text.d.ts.map +0 -1
- package/lib/typescript/src/mappings/TextArea.d.ts.map +0 -1
- package/lib/typescript/src/mappings/TextField.d.ts.map +0 -1
- package/lib/typescript/src/mappings/TextInput.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Touchable.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Video.d.ts.map +0 -1
- package/lib/typescript/src/mappings/View.d.ts.map +0 -1
- package/lib/typescript/src/mappings/WebView.d.ts.map +0 -1
- package/lib/typescript/src/styles/DarkTheme.d.ts.map +0 -1
- package/lib/typescript/src/styles/DefaultTheme.d.ts.map +0 -1
- package/lib/typescript/src/styles/fonts.d.ts.map +0 -1
- package/lib/typescript/src/styles/overlay.d.ts.map +0 -1
- package/lib/typescript/src/styles/shadow.d.ts.map +0 -1
- package/lib/typescript/src/theming.d.ts.map +0 -1
- package/lib/typescript/src/utilities.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NumberInput","onChangeText","value","defaultValue","props","currentStringNumberValue","setCurrentStringNumberValue","useState","formatValueToStringNumber","valueToFormat","isString","test","slice","isNumber","isNaN","toString","useEffect","defaultStringNumberValue","handleChangeText","newValue","newStringNumberValue","number","parseFloat","nextStringNumberValue"],"
|
|
1
|
+
{"version":3,"names":["NumberInput","onChangeText","value","defaultValue","props","currentStringNumberValue","setCurrentStringNumberValue","useState","formatValueToStringNumber","valueToFormat","isString","test","slice","isNumber","isNaN","toString","useEffect","defaultStringNumberValue","handleChangeText","newValue","newStringNumberValue","number","parseFloat","nextStringNumberValue"],"sources":["NumberInput.tsx"],"sourcesContent":["import React, { FC, useEffect, useState } from \"react\";\nimport { TextInput } from \"react-native\";\nimport { isString, isNumber, isNaN } from \"lodash\";\n\ninterface Props {\n value?: number | string;\n defaultValue?: number | string;\n onChangeText?: (value?: number) => void;\n}\n\nconst NumberInput: FC<Props> = ({\n onChangeText,\n value,\n defaultValue,\n ...props\n}) => {\n const [currentStringNumberValue, setCurrentStringNumberValue] = useState(\"0\");\n\n const formatValueToStringNumber = (valueToFormat?: number | string) => {\n if (valueToFormat != null) {\n if (isString(valueToFormat) && valueToFormat !== \"\") {\n if (/^0[1-9]$/.test(valueToFormat)) {\n return valueToFormat.slice(1);\n } else if (/^[+-]?([0-9]+\\.?[0-9]*|\\.[0-9]+)$/.test(valueToFormat)) {\n return valueToFormat;\n } else {\n return currentStringNumberValue;\n }\n } else if (isNumber(valueToFormat) && !isNaN(valueToFormat)) {\n return valueToFormat.toString();\n }\n }\n\n return \"0\";\n };\n\n // set currentStringNumberValue as defaultValue prop if there is a differnce on first render only\n useEffect(() => {\n const defaultStringNumberValue = formatValueToStringNumber(defaultValue);\n\n if (currentStringNumberValue !== defaultStringNumberValue) {\n setCurrentStringNumberValue(defaultStringNumberValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleChangeText = (newValue: string) => {\n const newStringNumberValue = formatValueToStringNumber(newValue);\n const number = parseFloat(newStringNumberValue);\n\n setCurrentStringNumberValue(newStringNumberValue);\n onChangeText?.(number);\n };\n\n // run handleChangeText with value prop only when value prop changes (and first render to reset currentStringNumberValue)\n useEffect(() => {\n const nextStringNumberValue = formatValueToStringNumber(value);\n\n if (currentStringNumberValue !== nextStringNumberValue) {\n handleChangeText(nextStringNumberValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n\n return (\n <TextInput\n keyboardType=\"numeric\"\n value={currentStringNumberValue}\n onChangeText={handleChangeText}\n {...props}\n />\n );\n};\n\nexport default NumberInput;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAmD;AAAA;AAAA;AAQnD,MAAMA,WAAsB,GAAG,QAKzB;EAAA,IAL0B;IAC9BC,YAAY;IACZC,KAAK;IACLC,YAAY;IACZ,GAAGC;EACL,CAAC;EACC,MAAM,CAACC,wBAAwB,EAAEC,2BAA2B,CAAC,GAAG,IAAAC,eAAQ,EAAC,GAAG,CAAC;EAE7E,MAAMC,yBAAyB,GAAIC,aAA+B,IAAK;IACrE,IAAIA,aAAa,IAAI,IAAI,EAAE;MACzB,IAAI,IAAAC,gBAAQ,EAACD,aAAa,CAAC,IAAIA,aAAa,KAAK,EAAE,EAAE;QACnD,IAAI,UAAU,CAACE,IAAI,CAACF,aAAa,CAAC,EAAE;UAClC,OAAOA,aAAa,CAACG,KAAK,CAAC,CAAC,CAAC;QAC/B,CAAC,MAAM,IAAI,mCAAmC,CAACD,IAAI,CAACF,aAAa,CAAC,EAAE;UAClE,OAAOA,aAAa;QACtB,CAAC,MAAM;UACL,OAAOJ,wBAAwB;QACjC;MACF,CAAC,MAAM,IAAI,IAAAQ,gBAAQ,EAACJ,aAAa,CAAC,IAAI,CAAC,IAAAK,aAAK,EAACL,aAAa,CAAC,EAAE;QAC3D,OAAOA,aAAa,CAACM,QAAQ,EAAE;MACjC;IACF;IAEA,OAAO,GAAG;EACZ,CAAC;;EAED;EACA,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,wBAAwB,GAAGT,yBAAyB,CAACL,YAAY,CAAC;IAExE,IAAIE,wBAAwB,KAAKY,wBAAwB,EAAE;MACzDX,2BAA2B,CAACW,wBAAwB,CAAC;IACvD;IACA;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,gBAAgB,GAAIC,QAAgB,IAAK;IAC7C,MAAMC,oBAAoB,GAAGZ,yBAAyB,CAACW,QAAQ,CAAC;IAChE,MAAME,MAAM,GAAGC,UAAU,CAACF,oBAAoB,CAAC;IAE/Cd,2BAA2B,CAACc,oBAAoB,CAAC;IACjDnB,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGoB,MAAM,CAAC;EACxB,CAAC;;EAED;EACA,IAAAL,gBAAS,EAAC,MAAM;IACd,MAAMO,qBAAqB,GAAGf,yBAAyB,CAACN,KAAK,CAAC;IAE9D,IAAIG,wBAAwB,KAAKkB,qBAAqB,EAAE;MACtDL,gBAAgB,CAACK,qBAAqB,CAAC;IACzC;IACA;EACF,CAAC,EAAE,CAACrB,KAAK,CAAC,CAAC;EAEX,oBACE,6BAAC,sBAAS;IACR,YAAY,EAAC,SAAS;IACtB,KAAK,EAAEG,wBAAyB;IAChC,YAAY,EAAEa;EAAiB,GAC3Bd,KAAK,EACT;AAEN,CAAC;AAAC,eAEaJ,WAAW;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["normalizeOptions","options","length","map","option","label","String","value","isObject","Error","width","deviceWidth","height","deviceHeight","Dimensions","get","isIos","Platform","OS","unstyledColor","disabledColor","errorColor","Picker","error","onValueChange","defaultValue","Icon","style","placeholder","disabled","theme","assistiveText","iconColor","iconSize","leftIconMode","leftIconName","placeholderTextColor","rightIconName","type","androidPickerRef","React","useRef","undefined","internalValue","setInternalValue","useState","pickerVisible","setPickerVisible","togglePickerVisible","useEffect","current","focus","normalizedOptions","pickerOptions","colors","viewStyles","textStyles","extractStyles","additionalBorderStyles","additionalMarginStyles","borderStyles","extractedBorderStyles","marginStyles","extractedMarginStyles","extractBorderAndMarginStyles","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","borderTopWidth","borderRightWidth","borderLeftWidth","borderBottomWidth","borderColor","borderStyle","backgroundColor","stylesWithoutBordersAndMargins","omit","borderStyleNames","marginStyleNames","selectedLabel","find","labelText","textAlign","color","fontSize","paddingBottom","leftIconOutset","leftIcon","marginRight","marginLeft","rightIcon","calculateLeftPadding","Math","abs","assistiveTextLabel","paddingLeft","paddingTop","primaryTextStyle","pickBy","identity","handleValueChange","newValue","itemIndex","styles","marginsContainer","touchableContainer","outsetContainer","insetContainer","primaryTextContainer","iosPicker","divider","iosSafeArea","iosButton","iosNativePicker","nonIosPicker","StyleSheet","create","alignSelf","alignItems","maxWidth","flex","flexDirection","justifyContent","paddingRight","position","bottom","left","right","maxHeight","opacity","top","withTheme"],"sourceRoot":"../../src","sources":["Picker.tsx"],"mappings":";;;;;;AAAA;AACA;AASA;AACA;AACA;AAEA;AACA;AACA;AACA;AAGA;AAKyB;AAAA;AAAA;AA6BzB,SAASA,gBAAgB,CAACC,OAA+B,EAAkB;EACzE,IAAIA,OAAO,CAACC,MAAM,KAAK,CAAC,EAAE;IACxB,OAAO,EAAE;EACX;EAEA,IAAI,OAAOD,OAAO,CAAC,CAAC,CAAC,MAAM,QAAQ,IAAI,QAAQ,CAAC,EAAE;IAChD,OAAQA,OAAO,CAAcE,GAAG,CAAEC,MAAM,KAAM;MAC5CC,KAAK,EAAEC,MAAM,CAACF,MAAM,CAAC;MACrBG,KAAK,EAAED,MAAM,CAACF,MAAM;IACtB,CAAC,CAAC,CAAC;EACL;EAEA,IACE,IAAAI,gBAAQ,EAACP,OAAO,CAAC,CAAC,CAAC,CAAC,IACpBA,OAAO,CAAC,CAAC,CAAC,CAACM,KAAK,KAAK,IAAI,IACzBN,OAAO,CAAC,CAAC,CAAC,CAACI,KAAK,KAAK,IAAI,EACzB;IACA,OAAQJ,OAAO,CAAoBE,GAAG,CAAEC,MAAM,IAAK;MACjD,OAAO;QACLC,KAAK,EAAEC,MAAM,CAACF,MAAM,CAACC,KAAK,CAAC;QAC3BE,KAAK,EAAED,MAAM,CAACF,MAAM,CAACG,KAAK;MAC5B,CAAC;IACH,CAAC,CAAC;EACJ;EAEA,MAAM,IAAIE,KAAK,CACb,8GAA8G,CAC/G;AACH;AAEA,MAAM;EAAEC,KAAK,EAAE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,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRF,MAAM,EAAE,CAAC;IACTpH,KAAK,EAAE,MAAM;IACb8G,QAAQ,EAAE7G,WAAW;IACrBsH,SAAS,EAAEpH;EACb;AACF,CAAC,CAAC;AAAC,eAEY,IAAAuH,kBAAS,EAAC9G,MAAM,CAAC;AAAA"}
|
|
1
|
+
{"version":3,"names":["normalizeOptions","options","length","map","option","label","String","value","isObject","Error","width","deviceWidth","height","deviceHeight","Dimensions","get","isIos","Platform","OS","unstyledColor","disabledColor","errorColor","Picker","error","onValueChange","defaultValue","Icon","style","placeholder","disabled","theme","assistiveText","iconColor","iconSize","leftIconMode","leftIconName","placeholderTextColor","rightIconName","type","androidPickerRef","React","useRef","undefined","internalValue","setInternalValue","useState","pickerVisible","setPickerVisible","togglePickerVisible","useEffect","current","focus","normalizedOptions","pickerOptions","colors","viewStyles","textStyles","extractStyles","additionalBorderStyles","additionalMarginStyles","borderStyles","extractedBorderStyles","marginStyles","extractedMarginStyles","extractBorderAndMarginStyles","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","borderTopWidth","borderRightWidth","borderLeftWidth","borderBottomWidth","borderColor","borderStyle","backgroundColor","stylesWithoutBordersAndMargins","omit","borderStyleNames","marginStyleNames","selectedLabel","find","labelText","textAlign","color","fontSize","paddingBottom","leftIconOutset","leftIcon","marginRight","marginLeft","rightIcon","calculateLeftPadding","Math","abs","assistiveTextLabel","paddingLeft","paddingTop","primaryTextStyle","pickBy","identity","handleValueChange","newValue","itemIndex","styles","marginsContainer","touchableContainer","outsetContainer","insetContainer","primaryTextContainer","iosPicker","divider","iosSafeArea","iosButton","iosNativePicker","nonIosPicker","StyleSheet","create","alignSelf","alignItems","maxWidth","flex","flexDirection","justifyContent","paddingRight","position","bottom","left","right","maxHeight","opacity","top","withTheme"],"sources":["Picker.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n Text,\n Platform,\n ViewStyle,\n StyleProp,\n Dimensions,\n} from \"react-native\";\nimport { omit, pickBy, identity, isObject } from \"lodash\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { Picker as NativePicker } from \"@react-native-picker/picker\";\n\nimport { withTheme } from \"../../theming\";\nimport Portal from \"../Portal/Portal\";\nimport Button from \"../DeprecatedButton\";\nimport Touchable from \"../Touchable\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport {\n extractStyles,\n extractBorderAndMarginStyles,\n borderStyleNames,\n marginStyleNames,\n} from \"../../utilities\";\n\nexport interface PickerOption {\n value: string;\n label: string;\n}\n\nexport type PickerProps = {\n error?: any;\n placeholder?: string;\n disabled?: boolean;\n style?: StyleProp<ViewStyle> & { height?: number };\n value?: string;\n options: PickerOption[] | string[];\n onValueChange: (value: string, index: number) => void;\n defaultValue?: string;\n assistiveText?: string;\n label?: string;\n iconColor?: string;\n iconSize?: number;\n leftIconMode?: \"inset\" | \"outset\";\n leftIconName?: string;\n placeholderTextColor?: string;\n rightIconName?: string;\n type?: \"solid\" | \"underline\";\n theme: Theme;\n Icon: IconSlot[\"Icon\"];\n};\n\nfunction normalizeOptions(options: PickerProps[\"options\"]): PickerOption[] {\n if (options.length === 0) {\n return [];\n }\n\n if (typeof options[0] === (\"string\" || \"number\")) {\n return (options as string[]).map((option) => ({\n label: String(option),\n value: String(option),\n }));\n }\n\n if (\n isObject(options[0]) &&\n options[0].value !== null &&\n options[0].label !== null\n ) {\n return (options as PickerOption[]).map((option) => {\n return {\n label: String(option.label),\n value: String(option.value),\n };\n });\n }\n\n throw new Error(\n 'Picker options must be either an array of strings or array of { \"label\": string; \"value\": string; } objects.'\n );\n}\n\nconst { width: deviceWidth, height: deviceHeight } = Dimensions.get(\"screen\");\nconst isIos = Platform.OS === \"ios\";\nconst unstyledColor = \"rgba(165, 173, 183, 1)\";\nconst disabledColor = \"rgb(240, 240, 240)\";\nconst errorColor = \"rgba(255, 69, 100, 1)\";\n\nconst Picker: React.FC<PickerProps> = ({\n error,\n options = [],\n onValueChange,\n defaultValue,\n Icon,\n style,\n placeholder,\n value,\n disabled = false,\n theme,\n assistiveText,\n label,\n iconColor = unstyledColor,\n iconSize = 24,\n leftIconMode = \"inset\",\n leftIconName,\n placeholderTextColor = unstyledColor,\n rightIconName,\n type = \"solid\",\n}) => {\n const androidPickerRef = React.useRef<any | undefined>(undefined);\n\n const [internalValue, setInternalValue] = React.useState<string | undefined>(\n value || defaultValue\n );\n\n const [pickerVisible, setPickerVisible] = React.useState(false);\n\n const togglePickerVisible = () => {\n setPickerVisible(!pickerVisible);\n };\n\n React.useEffect(() => {\n if (value != null) {\n setInternalValue(value);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n React.useEffect(() => {\n if (pickerVisible && androidPickerRef.current) {\n androidPickerRef?.current?.focus();\n }\n }, [pickerVisible, androidPickerRef]);\n\n const normalizedOptions = normalizeOptions(options);\n\n const pickerOptions = placeholder\n ? [{ value: placeholder, label: placeholder }, ...normalizedOptions]\n : normalizedOptions;\n\n const { colors } = theme;\n\n const { viewStyles, textStyles } = extractStyles(style);\n\n const additionalBorderStyles = [\"backgroundColor\"];\n\n const additionalMarginStyles = [\n \"bottom\",\n \"height\",\n \"left\",\n \"maxHeight\",\n \"maxWidth\",\n \"minHeight\",\n \"minWidth\",\n \"overflow\",\n \"position\",\n \"right\",\n \"top\",\n \"width\",\n \"zIndex\",\n ];\n\n const {\n borderStyles: extractedBorderStyles,\n marginStyles: extractedMarginStyles,\n } = extractBorderAndMarginStyles(\n viewStyles,\n additionalBorderStyles,\n additionalMarginStyles\n );\n\n const borderStyles = {\n ...{\n ...(type === \"solid\"\n ? {\n borderTopLeftRadius: 5,\n borderTopRightRadius: 5,\n borderBottomRightRadius: 5,\n borderBottomLeftRadius: 5,\n borderTopWidth: 1,\n borderRightWidth: 1,\n borderLeftWidth: 1,\n }\n : {}),\n borderBottomWidth: 1,\n borderColor: unstyledColor,\n borderStyle: \"solid\",\n },\n ...extractedBorderStyles,\n ...(error ? { borderColor: errorColor } : {}),\n ...(disabled\n ? { borderColor: \"transparent\", backgroundColor: disabledColor }\n : {}),\n };\n\n const marginStyles = {\n height: 60,\n ...extractedMarginStyles,\n };\n\n const stylesWithoutBordersAndMargins = omit(viewStyles, [\n ...borderStyleNames,\n ...marginStyleNames,\n ...additionalBorderStyles,\n ...additionalMarginStyles,\n ]);\n\n const selectedLabel =\n internalValue &&\n ((pickerOptions as unknown as PickerOption[]).find(\n (option) => option.value === internalValue\n )?.label ??\n internalValue);\n\n const labelText = label ? (\n <Text\n style={{\n textAlign: textStyles.textAlign,\n color: unstyledColor,\n fontSize: 12,\n paddingBottom: 4,\n }}\n >\n {label}\n </Text>\n ) : null;\n\n const leftIconOutset = leftIconMode === \"outset\";\n\n const leftIcon = leftIconName ? (\n <Icon\n name={leftIconName}\n color={disabled ? unstyledColor : iconColor}\n size={iconSize}\n style={{\n marginRight: 4,\n marginLeft: 4,\n }}\n />\n ) : null;\n\n const rightIcon = rightIconName ? (\n <Icon\n name={rightIconName}\n color={disabled ? unstyledColor : iconColor}\n size={iconSize}\n style={{\n marginRight: -10,\n marginLeft: 8,\n }}\n />\n ) : null;\n\n const textAlign = textStyles?.textAlign;\n\n const calculateLeftPadding = () => {\n if (leftIconOutset) {\n if (textAlign === \"center\") {\n return iconSize - Math.abs(8 - iconSize);\n }\n\n return iconSize + 8;\n }\n\n return 0;\n };\n\n const assistiveTextLabel = assistiveText ? (\n <Text\n style={{\n textAlign,\n width: \"100%\",\n paddingLeft: calculateLeftPadding(),\n color: unstyledColor,\n fontSize: 12,\n paddingTop: 4,\n }}\n >\n {assistiveText}\n </Text>\n ) : null;\n\n const primaryTextStyle = {\n color: unstyledColor,\n fontSize: 14,\n ...pickBy(textStyles, identity),\n ...(placeholder === internalValue ? { color: placeholderTextColor } : {}),\n ...(disabled ? { color: unstyledColor } : {}),\n };\n\n const handleValueChange = (newValue: string, itemIndex: number) => {\n if (!placeholder || itemIndex > 0) {\n onValueChange?.(newValue, itemIndex);\n }\n setInternalValue(newValue);\n };\n\n return (\n /* marginsContainer */\n <View style={[styles.marginsContainer, marginStyles]}>\n {/* touchableContainer */}\n <Touchable\n disabled={disabled}\n onPress={togglePickerVisible}\n style={styles.touchableContainer}\n >\n {/* outsetContainer */}\n <View\n pointerEvents=\"none\"\n style={[\n styles.outsetContainer,\n stylesWithoutBordersAndMargins,\n !leftIconOutset ? (borderStyles as PickerProps[\"style\"]) : {},\n ]}\n >\n {leftIcon}\n\n {/* insetContainer */}\n <View\n style={[\n styles.insetContainer,\n leftIconOutset ? (borderStyles as PickerProps[\"style\"]) : {},\n ]}\n >\n {/* primaryTextContainer */}\n <View style={styles.primaryTextContainer}>\n {labelText}\n\n <Text style={primaryTextStyle}>\n {String(selectedLabel ?? placeholder)}\n </Text>\n </View>\n\n {rightIcon}\n </View>\n </View>\n {assistiveTextLabel}\n </Touchable>\n\n {/* iosPicker */}\n {isIos && pickerVisible ? (\n <Portal>\n <View\n style={[\n styles.iosPicker,\n {\n backgroundColor: colors.divider,\n },\n ]}\n >\n <SafeAreaView style={styles.iosSafeArea}>\n <Button\n Icon={Icon}\n type=\"text\"\n onPress={togglePickerVisible}\n style={styles.iosButton}\n >\n {\"Close\"}\n </Button>\n\n <NativePicker\n style={styles.iosNativePicker}\n selectedValue={internalValue}\n onValueChange={handleValueChange}\n >\n {(pickerOptions as unknown as PickerOption[]).map((option) => (\n <NativePicker.Item\n label={option.label}\n value={option.value}\n key={option.value}\n />\n ))}\n </NativePicker>\n </SafeAreaView>\n </View>\n </Portal>\n ) : null}\n\n {/* nonIosPicker */}\n {!isIos && pickerVisible ? (\n <NativePicker\n enabled={pickerVisible}\n selectedValue={internalValue}\n onValueChange={handleValueChange}\n style={styles.nonIosPicker}\n ref={androidPickerRef}\n onBlur={() => setPickerVisible(false)}\n >\n {(pickerOptions as unknown as PickerOption[]).map((option) => (\n <NativePicker.Item\n label={option.label}\n value={option.value}\n key={option.value}\n />\n ))}\n </NativePicker>\n ) : null}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n marginsContainer: {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n width: \"100%\",\n maxWidth: deviceWidth,\n },\n touchableContainer: {\n flex: 1,\n height: \"100%\",\n width: \"100%\",\n alignSelf: \"stretch\",\n alignItems: \"center\",\n },\n outsetContainer: {\n flex: 1,\n height: \"100%\",\n width: \"100%\",\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n },\n insetContainer: {\n flex: 1,\n height: \"100%\",\n width: \"100%\",\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n paddingLeft: 12,\n paddingRight: 12,\n },\n primaryTextContainer: {\n flex: 1,\n },\n iosPicker: {\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n width: \"100%\",\n maxWidth: deviceWidth,\n maxHeight: deviceHeight,\n },\n iosSafeArea: {\n backgroundColor: \"white\",\n flexDirection: \"column\",\n width: \"100%\",\n maxWidth: deviceWidth,\n },\n iosButton: {\n alignSelf: \"flex-end\",\n },\n iosNativePicker: {\n backgroundColor: \"white\",\n },\n nonIosPicker: {\n opacity: 0,\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: \"100%\",\n maxWidth: deviceWidth,\n maxHeight: deviceHeight,\n },\n});\n\nexport default withTheme(Picker);\n"],"mappings":";;;;;;AAAA;AACA;AASA;AACA;AACA;AAEA;AACA;AACA;AACA;AAGA;AAKyB;AAAA;AAAA;AA6BzB,SAASA,gBAAgB,CAACC,OAA+B,EAAkB;EACzE,IAAIA,OAAO,CAACC,MAAM,KAAK,CAAC,EAAE;IACxB,OAAO,EAAE;EACX;EAEA,IAAI,OAAOD,OAAO,CAAC,CAAC,CAAC,MAAM,QAAQ,IAAI,QAAQ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AAC;EACDf,oBAAoB,EAAE;IACpBY,IAAI,EAAE;EACR,CAAC;EACDX,SAAS,EAAE;IACTe,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRN,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBjH,KAAK,EAAE,MAAM;IACb8G,QAAQ,EAAE7G,WAAW;IACrBsH,SAAS,EAAEpH;EACb,CAAC;EACDmG,WAAW,EAAE;IACXrC,eAAe,EAAE,OAAO;IACxB+C,aAAa,EAAE,QAAQ;IACvBhH,KAAK,EAAE,MAAM;IACb8G,QAAQ,EAAE7G;EACZ,CAAC;EACDsG,SAAS,EAAE;IACTK,SAAS,EAAE;EACb,CAAC;EACDJ,eAAe,EAAE;IACfvC,eAAe,EAAE;EACnB,CAAC;EACDwC,YAAY,EAAE;IACZe,OAAO,EAAE,CAAC;IACVL,QAAQ,EAAE,UAAU;IACpBM,GAAG,EAAE,CAAC;IACNJ,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRF,MAAM,EAAE,CAAC;IACTpH,KAAK,EAAE,MAAM;IACb8G,QAAQ,EAAE7G,WAAW;IACrBsH,SAAS,EAAEpH;EACb;AACF,CAAC,CAAC;AAAC,eAEY,IAAAuH,kBAAS,EAAC9G,MAAM,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Picker","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","extractStyles","textField","React","useRef","undefined","itemValue","itemIndex","toggleFocus","current","stylesWithoutMargin","omit","StyleSheet","flatten","selectedLabel","find","o","value","label","styles","container","opacity","position","top","left","right","bottom","width","map","create","alignSelf","withTheme"],"
|
|
1
|
+
{"version":3,"names":["Picker","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","extractStyles","textField","React","useRef","undefined","itemValue","itemIndex","toggleFocus","current","stylesWithoutMargin","omit","StyleSheet","flatten","selectedLabel","find","o","value","label","styles","container","opacity","position","top","left","right","bottom","width","map","create","alignSelf","withTheme"],"sources":["PickerComponent.android.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport omit from \"lodash.omit\";\nimport { withTheme } from \"../../theming\";\nimport { Picker as NativePicker } from \"@react-native-picker/picker\";\nimport { extractStyles } from \"../../utilities\";\n\nimport TextField from \"../TextField\";\nimport Touchable from \"../Touchable\";\nimport { PickerComponentProps } from \"./PickerTypes\";\n\nconst Picker: React.FC<PickerComponentProps> = ({\n style,\n options,\n placeholder,\n selectedValue,\n disabled = false,\n onValueChange: onValueChangeOverride = () => {},\n ...props\n}) => {\n const {\n viewStyles: {\n borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n padding, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...viewStyles\n },\n } = extractStyles(style);\n\n const textField = React.useRef<typeof TextField | undefined>(undefined);\n\n const onValueChange = (itemValue: string, itemIndex: number) => {\n toggleFocus();\n onValueChangeOverride(itemValue, itemIndex);\n };\n\n const toggleFocus = () => {\n if (!disabled) {\n // @ts-ignore\n textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()\n }\n };\n\n const stylesWithoutMargin =\n style &&\n omit(StyleSheet.flatten(style), [\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n ]);\n\n const selectedLabel =\n selectedValue &&\n (options.find((o) => o.value === selectedValue)?.label ?? selectedValue);\n\n return (\n <Touchable\n disabled={disabled}\n onPress={toggleFocus}\n style={[styles.container, viewStyles]}\n >\n <View>\n <NativePicker\n enabled={!disabled}\n selectedValue={selectedValue}\n onValueChange={onValueChange}\n style={{\n opacity: 0,\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: \"100%\",\n }}\n >\n {options.map((o) => (\n <NativePicker.Item label={o.label} value={o.value} key={o.value} />\n ))}\n </NativePicker>\n <View pointerEvents=\"none\">\n <TextField\n {...props}\n value={selectedLabel}\n placeholder={placeholder}\n // @ts-ignore\n ref={textField} // cannot determine if ref is of correct type due to component being wrapped in a withTheme()\n disabled={disabled}\n // @ts-expect-error\n style={stylesWithoutMargin}\n />\n </View>\n </View>\n </Touchable>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n});\n\nexport default withTheme(Picker);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAqC;AAAA;AAAA;AAAA;AAGrC,MAAMA,MAAsC,GAAG,QAQzC;EAAA;EAAA,IAR0C;IAC9CC,KAAK;IACLC,OAAO;IACPC,WAAW;IACXC,aAAa;IACbC,QAAQ,GAAG,KAAK;IAChBC,aAAa,EAAEC,qBAAqB,GAAG,MAAM,CAAC,CAAC;IAC/C,GAAGC;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OAAO,EAAE,CAACJ,QAAS;IACnB,aAAa,EAAED,aAAc;IAC7B,aAAa,EAAEE,aAAc;IAC7B,KAAK,EAAE;MACLqC,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,CAAC;MACTC,KAAK,EAAE;IACT;EAAE,GAED/C,OAAO,CAACgD,GAAG,CAAEZ,CAAC,iBACb,oBAAC,cAAY,CAAC,IAAI;IAAC,KAAK,EAAEA,CAAC,CAACE,KAAM;IAAC,KAAK,EAAEF,CAAC,CAACC,KAAM;IAAC,GAAG,EAAED,CAAC,CAACC;EAAM,EACjE,CAAC,CACW,eACf,oBAAC,iBAAI;IAAC,aAAa,EAAC;EAAM,gBACxB,oBAAC,kBAAS,eACJ/B,KAAK;IACT,KAAK,EAAE4B,aAAc;IACrB,WAAW,EAAEjC;IACb;IAAA;IACA,GAAG,EAAEqB,SAAU,CAAC;IAAA;IAChB,QAAQ,EAAEnB;IACV;IAAA;IACA,KAAK,EAAE2B;EAAoB,GAC3B,CACG,CACF,CACG;AAEhB,CAAC;AAED,MAAMS,MAAM,GAAGP,uBAAU,CAACiB,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAACrD,MAAM,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Picker","Icon","style","options","placeholder","selectedValue","disabled","onValueChange","theme","colors","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","extractStyles","textField","React","useRef","undefined","pickerVisible","setIsPickerVisible","useState","toggleVisibility","current","toggleFocus","stylesWithoutMargin","omit","StyleSheet","flatten","selectedLabel","find","o","value","label","styles","container","String","picker","divider","pickerContainer","closeButton","map","create","alignSelf","position","bottom","left","right","flexDirection","justifyContent","width","withTheme"],"
|
|
1
|
+
{"version":3,"names":["Picker","Icon","style","options","placeholder","selectedValue","disabled","onValueChange","theme","colors","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","extractStyles","textField","React","useRef","undefined","pickerVisible","setIsPickerVisible","useState","toggleVisibility","current","toggleFocus","stylesWithoutMargin","omit","StyleSheet","flatten","selectedLabel","find","o","value","label","styles","container","String","picker","divider","pickerContainer","closeButton","map","create","alignSelf","position","bottom","left","right","flexDirection","justifyContent","width","withTheme"],"sources":["PickerComponent.ios.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport omit from \"lodash.omit\";\n\nimport { Picker as NativePicker } from \"@react-native-picker/picker\";\n\nimport { withTheme } from \"../../theming\";\n\nimport Portal from \"../Portal/Portal\";\nimport Button from \"../DeprecatedButton\";\nimport TextField from \"../TextField\";\nimport Touchable from \"../Touchable\";\nimport { PickerComponentProps } from \"./PickerTypes\";\nimport { extractStyles } from \"../../utilities\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\nconst Picker: React.FC<PickerComponentProps & IconSlot> = ({\n Icon,\n style,\n options,\n placeholder,\n selectedValue,\n disabled = false,\n onValueChange = () => {},\n theme: { colors },\n ...props\n}) => {\n const {\n viewStyles: {\n borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n padding, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...viewStyles\n },\n } = extractStyles(style);\n\n const textField = React.useRef<typeof TextField | undefined>(undefined);\n const [pickerVisible, setIsPickerVisible] = React.useState(false);\n\n const toggleVisibility = () => {\n setIsPickerVisible(!pickerVisible);\n // @ts-ignore\n textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()\n };\n\n const stylesWithoutMargin =\n style &&\n omit(StyleSheet.flatten(style), [\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n ]);\n\n const selectedLabel =\n selectedValue &&\n (options.find((o) => o.value === selectedValue)?.label ?? selectedValue);\n\n return (\n <View style={[styles.container, viewStyles]}>\n <Touchable disabled={disabled} onPress={toggleVisibility}>\n <TextField\n {...props}\n value={String(selectedLabel)}\n placeholder={placeholder}\n // @ts-ignore\n ref={textField} // cannot determine if ref is of correct type due to component being wrapped in a withTheme()\n disabled={disabled}\n pointerEvents=\"none\"\n // @ts-expect-error\n style={stylesWithoutMargin}\n Icon={Icon}\n />\n </Touchable>\n {pickerVisible && (\n <Portal>\n <View style={[styles.picker, { backgroundColor: colors.divider }]}>\n <SafeAreaView style={styles.pickerContainer}>\n <Button\n Icon={Icon}\n type=\"text\"\n onPress={toggleVisibility}\n style={styles.closeButton}\n >\n Close\n </Button>\n <NativePicker\n style={{ backgroundColor: \"white\" }}\n selectedValue={selectedValue}\n onValueChange={onValueChange}\n >\n {options.map((o: any) => (\n <NativePicker.Item\n label={o.label}\n value={o.value}\n key={o.value}\n />\n ))}\n </NativePicker>\n </SafeAreaView>\n </View>\n </Portal>\n )}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n picker: {\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n },\n pickerContainer: {\n backgroundColor: \"white\",\n flexDirection: \"column\",\n width: \"100%\",\n },\n closeButton: {\n alignSelf: \"flex-end\",\n },\n});\n\nexport default withTheme(Picker);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AAAgD;AAAA;AAAA;AAAA;AAGhD,MAAMA,MAAiD,GAAG,QAUpD;EAAA;EAAA,IAVqD;IACzDC,IAAI;IACJC,KAAK;IACLC,OAAO;IACPC,WAAW;IACXC,aAAa;IACbC,QAAQ,GAAG,KAAK;IAChBC,aAAa,GAAG,MAAM,CAAC,CAAC;IACxBC,KAAK,EAAE;MAAEC;IAAO,CAAC;IACjB,GAAGC;EACL,CAAC;EACC,MAAM;IACJC,UAAU,EAAE;MACVC,YAAY;MAAE;MACdC,WAAW;MAAE;MACbC,cAAc;MAAE;MAChBC,gBAAgB;MAAE;MAClBC,iBAAiB;MAAE;MACnBC,eAAe;MAAE;MACjBC,WAAW;MAAE;MACbC,eAAe;MAAE;MACjBC,OAAO;MAAE;MACTC,UAAU;MAAE;MACZC,YAAY;MAAE;MACdC,aAAa;MAAE;MACfC,WAAW;MAAE;MACb,GAAGb;IACL;EACF,CAAC,GAAG,IAAAc,wBAAa,EAACvB,KAAK,CAAC;EAExB,MAAMwB,SAAS,GAAGC,KAAK,CAACC,MAAM,CAA+BC,SAAS,CAAC;EACvE,MAAM,CAACC,aAAa,EAAEC,kBAAkB,CAAC,GAAGJ,KAAK,CAACK,QAAQ,CAAC,KAAK,CAAC;EAEjE,MAAMC,gBAAgB,GAAG,MAAM;IAC7BF,kBAAkB,CAAC,CAACD,aAAa,CAAC;IAClC;IACAJ,SAAS,CAACQ,OAAO,CAACC,WAAW,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Q,CAAE;IACpC,aAAa,EAAEd,aAAc;IAC7B,aAAa,EAAEE;EAAc,GAE5BJ,OAAO,CAACiD,GAAG,CAAEV,CAAM,iBAClB,oBAAC,cAAY,CAAC,IAAI;IAChB,KAAK,EAAEA,CAAC,CAACE,KAAM;IACf,KAAK,EAAEF,CAAC,CAACC,KAAM;IACf,GAAG,EAAED,CAAC,CAACC;EAAM,EAEhB,CAAC,CACW,CACF,CACV,CAEV,CACI;AAEX,CAAC;AAED,MAAME,MAAM,GAAGP,uBAAU,CAACe,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,SAAS,EAAE;EACb,CAAC;EACDN,MAAM,EAAE;IACNO,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDV,eAAe,EAAE;IACf/B,eAAe,EAAE,OAAO;IACxBwC,aAAa,EAAE,QAAQ;IACvBE,KAAK,EAAE;EACT,CAAC;EACDV,WAAW,EAAE;IACXG,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAAC,eAEY,IAAAQ,kBAAS,EAAC9D,MAAM,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Picker","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","extractStyles","textField","React","useRef","undefined","itemValue","itemIndex","toggleFocus","current","stylesWithoutMargin","omit","StyleSheet","flatten","selectedLabel","find","o","value","label","styles","container","flex","opacity","position","top","left","right","bottom","width","map","create","alignSelf","withTheme"],"
|
|
1
|
+
{"version":3,"names":["Picker","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","extractStyles","textField","React","useRef","undefined","itemValue","itemIndex","toggleFocus","current","stylesWithoutMargin","omit","StyleSheet","flatten","selectedLabel","find","o","value","label","styles","container","flex","opacity","position","top","left","right","bottom","width","map","create","alignSelf","withTheme"],"sources":["PickerComponent.web.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport { Picker as NativePicker } from \"@react-native-picker/picker\";\nimport omit from \"lodash.omit\";\nimport { withTheme } from \"../../theming\";\nimport { extractStyles } from \"../../utilities\";\n\nimport TextField from \"../TextField\";\nimport Touchable from \"../Touchable\";\nimport { PickerComponentProps } from \"./PickerTypes\";\n\nconst Picker: React.FC<PickerComponentProps> = ({\n style,\n options,\n placeholder,\n selectedValue,\n disabled = false,\n onValueChange: onValueChangeOverride = () => {},\n ...props\n}) => {\n const {\n viewStyles: {\n borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n padding, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...viewStyles\n },\n } = extractStyles(style);\n\n const textField = React.useRef<typeof TextField | undefined>(undefined);\n\n const onValueChange = (itemValue: string, itemIndex: number) => {\n toggleFocus();\n onValueChangeOverride(itemValue, itemIndex);\n };\n\n const toggleFocus = () => {\n if (!disabled) {\n // @ts-ignore\n textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()\n }\n };\n\n const stylesWithoutMargin =\n style &&\n omit(StyleSheet.flatten(style), [\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n ]);\n\n const selectedLabel =\n selectedValue &&\n (options.find((o) => o.value === selectedValue)?.label ?? selectedValue);\n\n return (\n <Touchable\n disabled={disabled}\n onPress={toggleFocus}\n style={[styles.container, viewStyles]}\n >\n <View>\n <NativePicker\n enabled={!disabled}\n selectedValue={selectedValue}\n onValueChange={onValueChange}\n style={{\n flex: 1,\n opacity: 0,\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: \"100%\",\n }}\n >\n {options.map((o) => (\n <NativePicker.Item label={o.label} value={o.value} key={o.value} />\n ))}\n </NativePicker>\n <View pointerEvents=\"none\">\n <TextField\n {...props}\n value={selectedLabel}\n placeholder={placeholder}\n // @ts-ignore\n ref={textField} // cannot determine if ref is of correct type due to component being wrapped in a withTheme()\n disabled={disabled}\n // @ts-expect-error\n style={stylesWithoutMargin}\n />\n </View>\n </View>\n </Touchable>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n});\n\nexport default withTheme(Picker);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAqC;AAAA;AAAA;AAAA;AAGrC,MAAMA,MAAsC,GAAG,QAQzC;EAAA;EAAA,IAR0C;IAC9CC,KAAK;IACLC,OAAO;IACPC,WAAW;IACXC,aAAa;IACbC,QAAQ,GAAG,KAAK;IAChBC,aAAa,EAAEC,qBAAqB,GAAG,MAAM,CAAC,CAAC;IAC/C,GAAGC;EACL,CAAC;EACC,MAAM;IACJC,UAAU,EAAE;MACVC,YAAY;MAAE;MACdC,WAA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E,aAAc;IAC7B,KAAK,EAAE;MACLqC,IAAI,EAAE,CAAC;MACPC,OAAO,EAAE,CAAC;MACVC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,CAAC;MACTC,KAAK,EAAE;IACT;EAAE,GAEDhD,OAAO,CAACiD,GAAG,CAAEb,CAAC,iBACb,oBAAC,cAAY,CAAC,IAAI;IAAC,KAAK,EAAEA,CAAC,CAACE,KAAM;IAAC,KAAK,EAAEF,CAAC,CAACC,KAAM;IAAC,GAAG,EAAED,CAAC,CAACC;EAAM,EACjE,CAAC,CACW,eACf,oBAAC,iBAAI;IAAC,aAAa,EAAC;EAAM,gBACxB,oBAAC,kBAAS,eACJ/B,KAAK;IACT,KAAK,EAAE4B,aAAc;IACrB,WAAW,EAAEjC;IACb;IAAA;IACA,GAAG,EAAEqB,SAAU,CAAC;IAAA;IAChB,QAAQ,EAAEnB;IACV;IAAA;IACA,KAAK,EAAE2B;EAAoB,GAC3B,CACG,CACF,CACG;AAEhB,CAAC;AAED,MAAMS,MAAM,GAAGP,uBAAU,CAACkB,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAACtD,MAAM,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"
|
|
1
|
+
{"version":3,"names":[],"sources":["PickerTypes.ts"],"sourcesContent":["import { ViewStyle } from \"react-native\";\nimport { StyleProp } from \"react-native\";\nimport { Props as TextFieldProps } from \"../TextField\";\n\nexport interface PickerOption {\n value: string;\n label: string;\n}\n\nexport interface PickerComponentProps extends TextFieldProps {\n style?: StyleProp<ViewStyle> & { height?: number };\n options: PickerOption[];\n placeholder?: string;\n selectedValue: string;\n disabled?: boolean;\n onValueChange?: (value: string, index: number) => void;\n defaultValue?: string;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Portal","React","Component","render","children","theme","props","manager","PortalHost","withTheme"],"
|
|
1
|
+
{"version":3,"names":["Portal","React","Component","render","children","theme","props","manager","PortalHost","withTheme"],"sources":["Portal.tsx"],"sourcesContent":["import * as React from \"react\";\nimport PortalConsumer from \"./PortalConsumer\";\nimport PortalHost, { PortalContext, PortalMethods } from \"./PortalHost\";\nimport { ThemeProvider, withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n /**\n * Content of the `Portal`.\n */\n children: React.ReactNode;\n /**\n * @optional\n */\n theme: Theme;\n};\n\n/**\n * Portal allows to render a component at a different place in the parent tree.\n * You can use it to render content which should appear above other elements, similar to `Modal`.\n * It requires a [`Portal.Host`](portal-host.html) component to be rendered somewhere in the parent tree.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Portal, Text } from 'react-native-paper';\n *\n * export default class MyComponent extends React.Component {\n * render() {\n * return (\n * <Portal>\n * <Text>This is rendered at a different place</Text>\n * </Portal>\n * );\n * }\n * }\n * ```\n */\nclass Portal extends React.Component<Props> {\n // @component ./PortalHost.tsx\n static Host = PortalHost;\n\n render() {\n const { children, theme } = this.props;\n\n return (\n <PortalContext.Consumer>\n {(manager) => (\n <PortalConsumer manager={manager as PortalMethods}>\n {/* @ts-ignore */}\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </PortalConsumer>\n )}\n </PortalContext.Consumer>\n );\n }\n}\n\nexport default withTheme(Portal);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAAyD;AAAA;AAAA;AAAA;AAAA;AAAA;AAczD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAM,SAASC,KAAK,CAACC,SAAS,CAAQ;EAC1C;;EAGAC,MAAM,GAAG;IACP,MAAM;MAAEC,QAAQ;MAAEC;IAAM,CAAC,GAAG,IAAI,CAACC,KAAK;IAEtC,oBACE,oBAAC,yBAAa,CAAC,QAAQ,QACnBC,OAAO,iBACP,oBAAC,uBAAc;MAAC,OAAO,EAAEA;IAAyB,gBAEhD,oBAAC,sBAAa;MAAC,KAAK,EAAEF;IAAM,GAAED,QAAQ,CAAiB,CAE1D,CACsB;EAE7B;AACF;AAAC,gBAlBKJ,MAAM,UAEIQ,mBAAU;AAAA,eAkBX,IAAAC,kBAAS,EAACT,MAAM,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PortalConsumer","React","Component","componentDidMount","checkManager","Promise","resolve","key","props","manager","mount","children","componentDidUpdate","update","componentWillUnmount","unmount","Error","render"],"
|
|
1
|
+
{"version":3,"names":["PortalConsumer","React","Component","componentDidMount","checkManager","Promise","resolve","key","props","manager","mount","children","componentDidUpdate","update","componentWillUnmount","unmount","Error","render"],"sources":["PortalConsumer.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { PortalMethods } from \"./PortalHost\";\n\ntype Props = {\n manager: PortalMethods;\n children: React.ReactNode;\n};\n\nexport default class PortalConsumer extends React.Component<Props> {\n async componentDidMount() {\n this.checkManager();\n\n // Delay updating to prevent React from going to infinite loop\n await Promise.resolve();\n\n this.key = this.props.manager.mount(this.props.children);\n }\n\n componentDidUpdate() {\n this.checkManager();\n\n this.props.manager.update(this.key, this.props.children);\n }\n\n componentWillUnmount() {\n this.checkManager();\n\n this.props.manager.unmount(this.key);\n }\n\n private key: any;\n\n private checkManager() {\n if (!this.props.manager) {\n throw new Error(\n \"Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\\n\\n\" +\n \"Please read our getting-started guide and make sure you've followed all the required steps.\\n\\n\" +\n \"https://callstack.github.io/react-native-paper/getting-started.html\"\n );\n }\n }\n\n render() {\n return null;\n }\n}\n"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA;AAAA;AAAA;AAQhB,MAAMA,cAAc,SAASC,KAAK,CAACC,SAAS,CAAQ;EAAA;IAAA;IAAA;EAAA;EACjE,MAAMC,iBAAiB,GAAG;IACxB,IAAI,CAACC,YAAY,EAAE;;IAEnB;IACA,MAAMC,OAAO,CAACC,OAAO,EAAE;IAEvB,IAAI,CAACC,GAAG,GAAG,IAAI,CAACC,KAAK,CAACC,OAAO,CAACC,KAAK,CAAC,IAAI,CAACF,KAAK,CAACG,QAAQ,CAAC;EAC1D;EAEAC,kBAAkB,GAAG;IACnB,IAAI,CAACR,YAAY,EAAE;IAEnB,IAAI,CAACI,KAAK,CAACC,OAAO,CAACI,MAAM,CAAC,IAAI,CAACN,GAAG,EAAE,IAAI,CAACC,KAAK,CAACG,QAAQ,CAAC;EAC1D;EAEAG,oBAAoB,GAAG;IACrB,IAAI,CAACV,YAAY,EAAE;IAEnB,IAAI,CAACI,KAAK,CAACC,OAAO,CAACM,OAAO,CAAC,IAAI,CAACR,GAAG,CAAC;EACtC;EAIQH,YAAY,GAAG;IACrB,IAAI,CAAC,IAAI,CAACI,KAAK,CAACC,OAAO,EAAE;MACvB,MAAM,IAAIO,KAAK,CACb,4GAA4G,GAC1G,iGAAiG,GACjG,qEAAqE,CACxE;IACH;EACF;EAEAC,MAAM,GAAG;IACP,OAAO,IAAI;EACb;AACF;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PortalContext","React","createContext","PortalHost","Component","manager","children","key","nextKey","mount","queue","push","type","update","op","index","findIndex","o","unmount","componentDidMount","length","action","pop","render","styles","container","props","setManager","StyleSheet","create","flex"],"
|
|
1
|
+
{"version":3,"names":["PortalContext","React","createContext","PortalHost","Component","manager","children","key","nextKey","mount","queue","push","type","update","op","index","findIndex","o","unmount","componentDidMount","length","action","pop","render","styles","container","props","setManager","StyleSheet","create","flex"],"sources":["PortalHost.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport PortalManager from \"./PortalManager\";\n\ntype Props = {\n children: React.ReactNode;\n};\n\ntype Operation =\n | { type: \"mount\"; key: number; children: React.ReactNode }\n | { type: \"update\"; key: number; children: React.ReactNode }\n | { type: \"unmount\"; key: number };\n\nexport type PortalMethods = {\n mount: (children: React.ReactNode) => number;\n update: (key: number, children: React.ReactNode) => void;\n unmount: (key: number) => void;\n};\n\nexport const PortalContext = React.createContext<PortalMethods>(null as any);\n\n/**\n * Portal host renders all of its children `Portal` elements.\n * For example, you can wrap a screen in `Portal.Host` to render items above the screen.\n * If you're using the `Provider` component, it already includes `Portal.Host`.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Text } from 'react-native';\n * import { Portal } from 'react-native-paper';\n *\n * export default class MyComponent extends React.Component {\n * render() {\n * return (\n * <Portal.Host>\n * <Text>Content of the app</Text>\n * </Portal.Host>\n * );\n * }\n * }\n * ```\n *\n * Here any `Portal` elements under `<App />` are rendered alongside `<App />` and will appear above `<App />` like a `Modal`.\n */\nexport default class PortalHost extends React.Component<Props> {\n static displayName = \"Portal.Host\";\n\n componentDidMount() {\n const manager = this.manager;\n const queue = this.queue;\n\n while (queue.length && manager) {\n const action = queue.pop();\n if (action) {\n switch (action.type) {\n case \"mount\":\n manager.mount(action.key, action.children);\n break;\n case \"update\":\n manager.update(action.key, action.children);\n break;\n case \"unmount\":\n manager.unmount(action.key);\n break;\n }\n }\n }\n }\n\n private setManager = (manager: PortalManager | undefined | null) => {\n this.manager = manager;\n };\n\n private mount = (children: React.ReactNode) => {\n const key = this.nextKey++;\n\n if (this.manager) {\n this.manager.mount(key, children);\n } else {\n this.queue.push({ type: \"mount\", key, children });\n }\n\n return key;\n };\n\n private update = (key: number, children: React.ReactNode) => {\n if (this.manager) {\n this.manager.update(key, children);\n } else {\n const op = { type: \"mount\", key, children };\n const index = this.queue.findIndex(\n (o) => o.type === \"mount\" || (o.type === \"update\" && o.key === key)\n );\n\n if (index > -1) {\n // @ts-ignore\n this.queue[index] = op;\n } else {\n this.queue.push(op as Operation);\n }\n }\n };\n\n private unmount = (key: number) => {\n if (this.manager) {\n this.manager.unmount(key);\n } else {\n this.queue.push({ type: \"unmount\", key });\n }\n };\n\n private nextKey = 0;\n private queue: Operation[] = [];\n private manager: PortalManager | null | undefined;\n\n render() {\n return (\n <PortalContext.Provider\n value={{\n mount: this.mount,\n update: this.update,\n unmount: this.unmount,\n }}\n >\n {/* Need collapsable=false here to clip the elevations, otherwise they appear above Portal components */}\n <View\n style={styles.container}\n collapsable={false}\n pointerEvents=\"box-none\"\n >\n {this.props.children}\n </View>\n <PortalManager ref={this.setManager} />\n </PortalContext.Provider>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAA4C;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBrC,MAAMA,aAAa,gBAAGC,KAAK,CAACC,aAAa,CAAgB,IAAI,CAAQ;;AAE5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAvBA;AAwBe,MAAMC,UAAU,SAASF,KAAK,CAACG,SAAS,CAAQ;EAAA;IAAA;IAAA,oCAyBvCC,OAAyC,IAAK;MAClE,IAAI,CAACA,OAAO,GAAGA,OAAO;IACxB,CAAC;IAAA,+BAEgBC,QAAyB,IAAK;MAC7C,MAAMC,GAAG,GAAG,IAAI,CAACC,OAAO,EAAE;MAE1B,IAAI,IAAI,CAACH,OAAO,EAAE;QAChB,IAAI,CAACA,OAAO,CAACI,KAAK,CAACF,GAAG,EAAED,QAAQ,CAAC;MACnC,CAAC,MAAM;QACL,IAAI,CAACI,KAAK,CAACC,IAAI,CAAC;UAAEC,IAAI,EAAE,OAAO;UAAEL,GAAG;UAAED;QAAS,CAAC,CAAC;MACnD;MAEA,OAAOC,GAAG;IACZ,CAAC;IAAA,gCAEgB,CAACA,GAAW,EAAED,QAAyB,KAAK;MAC3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AM,CAACf,QAAQ,CAAC;YAC1C;UACF,KAAK,QAAQ;YACXD,OAAO,CAACQ,MAAM,CAACQ,MAAM,CAACd,GAAG,EAAEc,MAAM,CAACf,QAAQ,CAAC;YAC3C;UACF,KAAK,SAAS;YACZD,OAAO,CAACa,OAAO,CAACG,MAAM,CAACd,GAAG,CAAC;YAC3B;QAAM;MAEZ;IACF;EACF;EAgDAgB,MAAM,GAAG;IACP,oBACE,oBAAC,aAAa,CAAC,QAAQ;MACrB,KAAK,EAAE;QACLd,KAAK,EAAE,IAAI,CAACA,KAAK;QACjBI,MAAM,EAAE,IAAI,CAACA,MAAM;QACnBK,OAAO,EAAE,IAAI,CAACA;MAChB;IAAE,gBAGF,oBAAC,iBAAI;MACH,KAAK,EAAEM,MAAM,CAACC,SAAU;MACxB,WAAW,EAAE,KAAM;MACnB,aAAa,EAAC;IAAU,GAEvB,IAAI,CAACC,KAAK,CAACpB,QAAQ,CACf,eACP,oBAAC,sBAAa;MAAC,GAAG,EAAE,IAAI,CAACqB;IAAW,EAAG,CAChB;EAE7B;AACF;AAAC;AAAA,gBA5FoBxB,UAAU,iBACR,aAAa;AA6FpC,MAAMqB,MAAM,GAAGI,uBAAU,CAACC,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PortalManager","React","PureComponent","portals","key","children","setState","state","map","item","filter","render","StyleSheet","absoluteFill"],"
|
|
1
|
+
{"version":3,"names":["PortalManager","React","PureComponent","portals","key","children","setState","state","map","item","filter","render","StyleSheet","absoluteFill"],"sources":["PortalManager.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\n\ntype State = {\n portals: Array<{\n key: number;\n children: React.ReactNode;\n }>;\n};\n\n/**\n * Portal host is the component which actually renders all Portals.\n */\nexport default class PortalManager extends React.PureComponent<{}, State> {\n state: State = {\n portals: [],\n };\n\n mount = (key: number, children: React.ReactNode) => {\n this.setState((state) => ({\n portals: [...state.portals, { key, children }],\n }));\n };\n\n update = (key: number, children: React.ReactNode) =>\n this.setState((state) => ({\n portals: state.portals.map((item) => {\n if (item.key === key) {\n return { ...item, children };\n }\n return item;\n }),\n }));\n\n unmount = (key: number) =>\n this.setState((state) => ({\n portals: state.portals.filter((item) => item.key !== key),\n }));\n\n render() {\n return this.state.portals.map(({ key, children }) => (\n <View\n key={key}\n collapsable={\n false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */\n }\n pointerEvents=\"box-none\"\n style={StyleSheet.absoluteFill}\n >\n {children}\n </View>\n ));\n }\n}\n"],"mappings":";;;;;;AAAA;AACA;AAAgD;AAAA;AAAA;AAAA;AAAA;AAShD;AACA;AACA;AACe,MAAMA,aAAa,SAASC,KAAK,CAACC,aAAa,CAAY;EAAA;IAAA;IAAA,+BACzD;MACbC,OAAO,EAAE;IACX,CAAC;IAAA,+BAEO,CAACC,GAAW,EAAEC,QAAyB,KAAK;MAClD,IAAI,CAACC,QAAQ,CAAEC,KAAK,KAAM;QACxBJ,OAAO,EAAE,CAAC,GAAGI,KAAK,CAACJ,OAAO,EAAE;UAAEC,GAAG;UAAEC;QAAS,CAAC;MAC/C,CAAC,CAAC,CAAC;IACL,CAAC;IAAA,gCAEQ,CAACD,GAAW,EAAEC,QAAyB,KAC9C,IAAI,CAACC,QAAQ,CAAEC,KAAK,KAAM;MACxBJ,OAAO,EAAEI,KAAK,CAACJ,OAAO,CAACK,GAAG,CAAEC,IAAI,IAAK;QACnC,IAAIA,IAAI,CAACL,GAAG,KAAKA,GAAG,EAAE;UACpB,OAAO;YAAE,GAAGK,IAAI;YAAEJ;UAAS,CAAC;QAC9B;QACA,OAAOI,IAAI;MACb,CAAC;IACH,CAAC,CAAC,CAAC;IAAA,iCAEML,GAAW,IACpB,IAAI,CAACE,QAAQ,CAAEC,KAAK,KAAM;MACxBJ,OAAO,EAAEI,KAAK,CAACJ,OAAO,CAACO,MAAM,CAAED,IAAI,IAAKA,IAAI,CAACL,GAAG,KAAKA,GAAG;IAC1D,CAAC,CAAC,CAAC;EAAA;EAELO,MAAM,GAAG;IACP,OAAO,IAAI,CAACJ,KAAK,CAACJ,OAAO,CAACK,GAAG,CAAC;MAAA,IAAC;QAAEJ,GAAG;QAAEC;MAAS,CAAC;MAAA,oBAC9C,oBAAC,iBAAI;QACH,GAAG,EAAED,GAAI;QACT,WAAW,EACT,KAAK,CAAC,wGACP;;QACD,aAAa,EAAC,UAAU;QACxB,KAAK,EAAEQ,uBAAU,CAACC;MAAa,GAE9BR,QAAQ,CACJ;IAAA,CACR,CAAC;EACJ;AACF;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","Config","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","useRadioButtonGroupContext","realValue","getValueForRadioButton","realContextValue","isSelected","handlePress"],"
|
|
1
|
+
{"version":3,"names":["RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","Config","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","useRadioButtonGroupContext","realValue","getValueForRadioButton","realContextValue","isSelected","handlePress"],"sources":["RadioButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\nimport Config from \"../Config\";\nimport IconButton from \"../IconButton\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { useRadioButtonGroupContext } from \"./context\";\n\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\nexport type RadioButtonProps = {\n selected?: boolean;\n disabled?: boolean;\n color?: string;\n value?: string | number;\n unselectedColor?: string;\n onPress?: (value?: string) => void;\n style?: StyleProp<ViewStyle>;\n size?: number;\n selectedIcon?: string;\n unselectedIcon?: string;\n} & IconSlot;\n\nconst RadioButton: React.FC<RadioButtonProps> = ({\n Icon,\n disabled = false,\n color,\n value = \"\",\n selected,\n unselectedColor,\n onPress,\n size = Config.radioButtonSize,\n selectedIcon = \"MaterialIcons/radio-button-checked\",\n unselectedIcon = \"MaterialIcons/radio-button-unchecked\",\n style,\n ...rest\n}) => {\n const { value: contextValue, onValueChange } = useRadioButtonGroupContext();\n\n const realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\n };\n\n return (\n <IconButton\n Icon={Icon}\n icon={isSelected ? selectedIcon : unselectedIcon}\n color={isSelected ? color : unselectedColor}\n disabled={disabled}\n onPress={handlePress}\n size={size}\n style={style}\n {...rest}\n />\n );\n};\n\nexport default RadioButton;\n"],"mappings":";;;;;;AAAA;AAGA;AACA;AACA;AACA;AAAuD;AAAA;AAAA;AAAA;AAiBvD,MAAMA,WAAuC,GAAG,QAa1C;EAAA,IAb2C;IAC/CC,IAAI;IACJC,QAAQ,GAAG,KAAK;IAChBC,KAAK;IACLC,KAAK,GAAG,EAAE;IACVC,QAAQ;IACRC,eAAe;IACfC,OAAO;IACPC,IAAI,GAAGC,eAAM,CAACC,eAAe;IAC7BC,YAAY,GAAG,oCAAoC;IACnDC,cAAc,GAAG,sCAAsC;IACvDC,KAAK;IACL,GAAGC;EACL,CAAC;EACC,MAAM;IAAEV,KAAK,EAAEW,YAAY;IAAEC;EAAc,CAAC,GAAG,IAAAC,mCAA0B,GAAE;EAE3E,MAAMC,SAAS,GAAG,IAAAC,iCAAsB,EAACf,KAAK,CAAC;EAC/C,MAAMgB,gBAAgB,GAAG,IAAAD,iCAAsB,EAACJ,YAAY,CAAC;EAC7D,MAAMM,UAAU,GAAGhB,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAIe,gBAAgB,KAAKF,SAAS;EAE7D,MAAMI,WAAW,GAAG,MAAM;IACxBf,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGW,SAAS,CAAC;IACpBF,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAGE,SAAS,CAAC;EAC5B,CAAC;EAED,oBACE,oBAAC,mBAAU;IACT,IAAI,EAAEjB,IAAK;IACX,IAAI,EAAEoB,UAAU,GAAGV,YAAY,GAAGC,cAAe;IACjD,KAAK,EAAES,UAAU,GAAGlB,KAAK,GAAGG,eAAgB;IAC5C,QAAQ,EAAEJ,QAAS;IACnB,OAAO,EAAEoB,WAAY;IACrB,IAAI,EAAEd,IAAK;IACX,KAAK,EAAEK;EAAM,GACTC,IAAI,EACR;AAEN,CAAC;AAAC,eAEad,WAAW;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","fontSize","typography","headline4","color","withTheme"],"
|
|
1
|
+
{"version":3,"names":["RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","fontSize","typography","headline4","color","withTheme"],"sources":["RadioButtonFieldGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, TextStyle, ViewStyle } from \"react-native\";\nimport Text from \"../Text\";\nimport { withTheme } from \"../../theming\";\nimport RadioButtonGroup, { RadioButtonGroupProps } from \"./RadioButtonGroup\";\n\ninterface Props extends RadioButtonGroupProps {\n label?: string;\n labelStyle?: StyleProp<TextStyle>;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButtonFieldGroup: React.FC<React.PropsWithChildren<Props>> = ({\n label,\n children,\n theme,\n labelStyle,\n style,\n ...rest\n}) => {\n return (\n <View style={style}>\n <Text\n style={[\n {\n fontSize: theme.typography.headline4.fontSize,\n color: theme.typography.headline4.color,\n },\n labelStyle,\n ]}\n >\n {label}\n </Text>\n <RadioButtonGroup theme={theme} {...rest}>\n {children}\n </RadioButtonGroup>\n </View>\n );\n};\n\nexport default withTheme(RadioButtonFieldGroup);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAA6E;AAAA;AAQ7E,MAAMA,qBAA+D,GAAG,QAOlE;EAAA,IAPmE;IACvEC,KAAK;IACLC,QAAQ;IACRC,KAAK;IACLC,UAAU;IACVC,KAAK;IACL,GAAGC;EACL,CAAC;EACC,oBACE,6BAAC,iBAAI;IAAC,KAAK,EAAED;EAAM,gBACjB,6BAAC,aAAI;IACH,KAAK,EAAE,CACL;MACEE,QAAQ,EAAEJ,KAAK,CAACK,UAAU,CAACC,SAAS,CAACF,QAAQ;MAC7CG,KAAK,EAAEP,KAAK,CAACK,UAAU,CAACC,SAAS,CAACC;IACpC,CAAC,EACDN,UAAU;EACV,GAEDH,KAAK,CACD,eACP,6BAAC,yBAAgB;IAAC,KAAK,EAAEE;EAAM,GAAKG,IAAI,GACrCJ,QAAQ,CACQ,CACd;AAEX,CAAC;AAAC,eAEa,IAAAS,kBAAS,EAACX,qBAAqB,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","getValueForRadioButton","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"
|
|
1
|
+
{"version":3,"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","getValueForRadioButton","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"sources":["RadioButtonGroup.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nexport interface RadioButtonGroupProps {\n direction?: Direction;\n style?: StyleProp<ViewStyle>;\n value: string | number;\n onValueChange?: (value: string) => void;\n defaultValue?: string | number;\n theme: Theme;\n children: React.ReactNode;\n}\n\nconst { Provider } = radioButtonGroupContext;\n\nconst RadioButtonGroup: React.FC<RadioButtonGroupProps> = ({\n direction = Direction.Vertical,\n value = \"\",\n onValueChange,\n defaultValue,\n style,\n children,\n ...rest\n}) => {\n const [internalValue, setInternalValue] = React.useState(\"\");\n\n React.useEffect(() => {\n if (value != null) {\n const realValue = getValueForRadioButton(value);\n\n setInternalValue(realValue);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n const realDefaultValue = getValueForRadioButton(defaultValue);\n\n setInternalValue(realDefaultValue);\n }\n }, [defaultValue]);\n\n const handleValueChange = (newValue: string | number) => {\n const realNewValue = getValueForRadioButton(newValue);\n\n setInternalValue(realNewValue);\n onValueChange?.(realNewValue);\n };\n\n const _containerStyle: StyleProp<ViewStyle> = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n\n return (\n <View style={[{ minHeight: 40 }, style]} {...rest}>\n <Provider\n value={{\n value: internalValue,\n onValueChange: handleValueChange,\n direction,\n }}\n >\n <View style={_containerStyle}>{children}</View>\n </Provider>\n </View>\n );\n};\n\nexport default RadioButtonGroup;\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAA+D;AAAA;AAAA;AAW/D,MAAM;EAAEA;AAAS,CAAC,GAAGC,gCAAuB;AAE5C,MAAMC,gBAAiD,GAAG,QAQpD;EAAA,IARqD;IACzDC,SAAS,GAAGC,kBAAS,CAACC,QAAQ;IAC9BC,KAAK,GAAG,EAAE;IACVC,aAAa;IACbC,YAAY;IACZC,KAAK;IACLC,QAAQ;IACR,GAAGC;EACL,CAAC;EACC,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAAC,EAAE,CAAC;EAE5DD,KAAK,CAACE,SAAS,CAAC,MAAM;IACpB,IAAIV,KAAK,IAAI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"names":["Direction","getRadioButtonAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","RadioButtonRow","Icon","label","color","unselectedColor","onPress","labelContainerStyle","radioButtonStyle","selected","disabled","style","rest","contextValue","onValueChange","useRadioButtonGroupContext","realValue","getValueForRadioButton","realContextValue","isSelected","handlePress","textStyles","viewStyles","extractStyles","styles","mainParent","flexDirection","alignItems","flex","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","display","Platform","select","web","cursor","userSelect"],"
|
|
1
|
+
{"version":3,"names":["Direction","getRadioButtonAlignment","parentDirection","direction","GroupDirection","Horizontal","Row","RowReverse","renderLabel","value","labelStyle","textStyle","RadioButtonRow","Icon","label","color","unselectedColor","onPress","labelContainerStyle","radioButtonStyle","selected","disabled","style","rest","contextValue","onValueChange","useRadioButtonGroupContext","realValue","getValueForRadioButton","realContextValue","isSelected","handlePress","textStyles","viewStyles","extractStyles","styles","mainParent","flexDirection","alignItems","flex","StyleSheet","create","justifyContent","paddingStart","minHeight","paddingEnd","display","Platform","select","web","cursor","userSelect"],"sources":["RadioButtonRow.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n StyleProp,\n ViewStyle,\n StyleSheet,\n TextStyle,\n View,\n Platform,\n} from \"react-native\";\nimport RadioButton, { RadioButtonProps } from \"./RadioButton\";\nimport Text from \"../Text\";\nimport { useRadioButtonGroupContext } from \"./context\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { Direction as GroupDirection } from \"./context\";\nimport Touchable from \"../Touchable\";\nimport { extractStyles, getValueForRadioButton } from \"../../utilities\";\n\nexport enum Direction {\n Row = \"row\",\n RowReverse = \"row-reverse\",\n}\n\nexport interface RadioButtonRowProps extends Omit<RadioButtonProps, \"onPress\"> {\n label: string | React.ReactNode;\n value: string | number; // A string (or number that will be parsed String(number)) that this radio button row represents when selected\n color?: string;\n unselectedColor?: string;\n labelContainerStyle: StyleProp<ViewStyle>;\n radioButtonStyle?: StyleProp<ViewStyle>;\n labelStyle?: StyleProp<TextStyle>;\n onPress?: (value: string) => void;\n direction?: Direction;\n}\n\nconst getRadioButtonAlignment = (\n parentDirection: GroupDirection | undefined,\n direction: Direction\n) => {\n if (parentDirection === GroupDirection.Horizontal) {\n return direction === Direction.Row ? \"flex-start\" : \"flex-end\";\n } else if (direction === Direction.RowReverse) {\n return \"flex-start\";\n } else {\n return \"flex-end\";\n }\n};\n\nconst renderLabel = (\n value: string | React.ReactNode,\n labelStyle: StyleProp<TextStyle>,\n textStyle: StyleProp<TextStyle>\n) => {\n if (typeof value === \"string\") {\n return <Text style={[labelStyle, textStyle]}>{value}</Text>;\n } else {\n return <>{value}</>;\n }\n};\n\nconst RadioButtonRow: React.FC<RadioButtonRowProps & IconSlot> = ({\n Icon,\n label,\n value = \"\",\n color,\n unselectedColor,\n onPress,\n labelContainerStyle,\n labelStyle,\n radioButtonStyle,\n direction = Direction.Row,\n selected,\n disabled,\n style,\n ...rest\n}) => {\n const {\n value: contextValue,\n onValueChange,\n direction: parentDirection,\n } = useRadioButtonGroupContext();\n\n const realValue = getValueForRadioButton(value);\n const realContextValue = getValueForRadioButton(contextValue);\n const isSelected = selected ?? realContextValue === realValue;\n\n const handlePress = () => {\n onPress?.(realValue);\n onValueChange?.(realValue);\n };\n\n const { textStyles, viewStyles } = extractStyles(style);\n\n return (\n <Touchable\n onPress={handlePress}\n style={[styles.mainParent, { flexDirection: direction }, viewStyles]}\n disabled={disabled}\n {...rest}\n >\n <View\n style={[\n styles.label,\n {\n alignItems: direction === Direction.Row ? \"flex-start\" : \"flex-end\",\n },\n labelContainerStyle,\n ]}\n >\n {renderLabel(label, labelStyle, textStyles)}\n </View>\n <View\n style={{\n flex: 1,\n alignItems: getRadioButtonAlignment(parentDirection, direction),\n }}\n >\n <RadioButton\n Icon={Icon}\n selected={isSelected}\n value={realValue}\n color={color}\n unselectedColor={unselectedColor}\n style={radioButtonStyle}\n />\n </View>\n </Touchable>\n );\n};\n\nconst styles = StyleSheet.create({\n mainParent: {\n alignItems: \"center\",\n justifyContent: \"space-around\",\n paddingStart: 20,\n minHeight: 50,\n paddingEnd: 20,\n display: \"flex\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n label: {\n flex: 3,\n },\n});\n\nexport default RadioButtonRow;\n"],"mappings":";;;;;;AAAA;AACA;AAQA;AACA;AACA;AAGA;AACA;AAAwE;AAAA;AAAA;AAAA;AAAA,IAE5DA,SAAS;AAAA;AAAA,WAATA,SAAS;EAATA,SAAS;EAATA,SAAS;AAAA,GAATA,SAAS,yBAATA,SAAS;AAiBrB,MAAMC,uBAAuB,GAAG,CAC9BC,eAA2C,EAC3CC,SAAoB,KACjB;EACH,IAAID,eAAe,KAAKE,kBAAc,CAACC,UAAU,EAAE;IACjD,OAAOF,SAAS,KAAKH,SAAS,CAACM,GAAG,GAAG,YAAY,GAAG,UAAU;EAChE,CAAC,MAAM,IAAIH,SAAS,KAAKH,SAAS,CAACO,UAAU,EAAE;IAC7C,OAAO,YAAY;EACrB,CAAC,MAAM;IACL,OAAO,UAAU;EACnB;AACF,CAAC;AAED,MAAMC,WAAW,GAAG,CAClBC,KAA+B,EAC/BC,UAAgC,EAChCC,SAA+B,KAC5B;EACH,IAAI,OAAOF,KAAK,KAAK,QAAQ,EAAE;IAC7B,oBAAO,oBAAC,aAAI;MAAC,KAAK,EAAE,CAACC,UAAU,EAAEC,SAAS;IAAE,GAAEF,KAAK,CAAQ;EAC7D,CAAC,MAAM;IACL,oBAAO,0CAAGA,KAAK,CAAI;EACrB;AACF,CAAC;AAED,MAAMG,cAAwD,GAAG,QAe3D;EAAA,IAf4D;IAChEC,IAAI;IACJC,KAAK;IACLL,KAAK,GAAG,EAAE;IACVM,KAAK;IACLC,eAAe;IACfC,OAAO;IACPC,mBAAmB;IACnBR,UAAU;IACVS,gBAAgB;IAChBhB,SAAS,GAAGH,SAAS,CAACM,GAAG;IACzBc,QAAQ;IACRC,QAAQ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UAAW;IACrB,KAAK,EAAEH,SAAU;IACjB,KAAK,EAAEZ,KAAM;IACb,eAAe,EAAEC,eAAgB;IACjC,KAAK,EAAEG;EAAiB,EACxB,CACG,CACG;AAEhB,CAAC;AAED,MAAMgB,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,UAAU,EAAE;IACVE,UAAU,EAAE,QAAQ;IACpBI,cAAc,EAAE,cAAc;IAC9BC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,EAAE;IACdC,OAAO,EAAE,MAAM;IACf,GAAGC,qBAAQ,CAACC,MAAM,CAAC;MACjBC,GAAG,EAAE;QACHC,MAAM,EAAE,SAAS;QACjBC,UAAU,EAAE;MACd;IACF,CAAC;EACH,CAAC;EACDrC,KAAK,EAAE;IACLyB,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAC,eAEY3B,cAAc;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Direction","radioButtonGroupContext","createContext","onValueChange","value","direction","undefined","useRadioButtonGroupContext","useContext"],"
|
|
1
|
+
{"version":3,"names":["Direction","radioButtonGroupContext","createContext","onValueChange","value","direction","undefined","useRadioButtonGroupContext","useContext"],"sources":["context.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\nexport enum Direction {\n Horizontal = \"horizontal\",\n Vertical = \"vertical\",\n}\ninterface RadioButtonGroupContext {\n onValueChange: (value: string) => void;\n value: string;\n direction?: Direction;\n}\n\nexport const radioButtonGroupContext = createContext<RadioButtonGroupContext>({\n onValueChange: () => {},\n value: \"\",\n direction: undefined,\n});\n\nexport function useRadioButtonGroupContext() {\n return useContext(radioButtonGroupContext);\n}\n"],"mappings":";;;;;;;AAAA;AAAkD,IAEtCA,SAAS;AAAA;AAAA,WAATA,SAAS;EAATA,SAAS;EAATA,SAAS;AAAA,GAATA,SAAS,yBAATA,SAAS;AAUd,MAAMC,uBAAuB,gBAAG,IAAAC,oBAAa,EAA0B;EAC5EC,aAAa,EAAE,MAAM,CAAC,CAAC;EACvBC,KAAK,EAAE,EAAE;EACTC,SAAS,EAAEC;AACb,CAAC,CAAC;AAAC;AAEI,SAASC,0BAA0B,GAAG;EAC3C,OAAO,IAAAC,iBAAU,EAACP,uBAAuB,CAAC;AAC5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export { default as RadioButton } from \"./RadioButton\";\nexport { default as RadioButtonGroup } from \"./RadioButtonGroup\";\nexport { default as RadioButtonRow } from \"./RadioButtonRow\";\nexport { default as RadioButtonFieldGroup } from \"./RadioButtonFieldGroup\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAA2E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SVG","source","Config","placeholderSvgURL","style","Platform","OS","uri"],"
|
|
1
|
+
{"version":3,"names":["SVG","source","Config","placeholderSvgURL","style","Platform","OS","uri"],"sources":["SVG.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, Platform, Image, StyleProp, ImageStyle } from \"react-native\";\nimport { SvgUri } from \"react-native-svg\";\n\nimport Config from \"./Config\";\n\ntype SVGComponentProps = {\n source: string;\n style?: StyleProp<ImageStyle>;\n};\n\nconst SVG: React.FC<React.PropsWithChildren<SVGComponentProps>> = ({\n source = Config.placeholderSvgURL,\n style,\n}) => {\n return (\n <>\n {Platform.OS === \"ios\" && (\n <View style={style}>\n <SvgUri width=\"100%\" height=\"100%\" uri={source} />\n </View>\n )}\n {Platform.OS === \"android\" && (\n <View style={style}>\n <SvgUri width=\"100%\" height=\"100%\" uri={source} />\n </View>\n )}\n {Platform.OS === \"web\" && (\n <Image style={style} source={{ uri: source }} />\n )}\n </>\n );\n};\n\nexport default SVG;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAEA;AAA8B;AAAA;AAAA;AAO9B,MAAMA,GAAyD,GAAG,QAG5D;EAAA,IAH6D;IACjEC,MAAM,GAAGC,eAAM,CAACC,iBAAiB;IACjCC;EACF,CAAC;EACC,oBACE,0CACGC,qBAAQ,CAACC,EAAE,KAAK,KAAK,iBACpB,oBAAC,iBAAI;IAAC,KAAK,EAAEF;EAAM,gBACjB,oBAAC,sBAAM;IAAC,KAAK,EAAC,MAAM;IAAC,MAAM,EAAC,MAAM;IAAC,GAAG,EAAEH;EAAO,EAAG,CAErD,EACAI,qBAAQ,CAACC,EAAE,KAAK,SAAS,iBACxB,oBAAC,iBAAI;IAAC,KAAK,EAAEF;EAAM,gBACjB,oBAAC,sBAAM;IAAC,KAAK,EAAC,MAAM;IAAC,MAAM,EAAC,MAAM;IAAC,GAAG,EAAEH;EAAO,EAAG,CAErD,EACAI,qBAAQ,CAACC,EAAE,KAAK,KAAK,iBACpB,oBAAC,kBAAK;IAAC,KAAK,EAAEF,KAAM;IAAC,MAAM,EAAE;MAAEG,GAAG,EAAEN;IAAO;EAAE,EAC9C,CACA;AAEP,CAAC;AAAC,eAEaD,GAAG;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ScreenContainer","scrollable","hasSafeArea","hasBottomSafeArea","hasTopSafeArea","theme","style","children","rest","backgroundColor","colors","background","edges","push","styles","container","scrollViewContainer","StyleSheet","create","flex","flexGrow","undefined","withTheme"],"
|
|
1
|
+
{"version":3,"names":["ScreenContainer","scrollable","hasSafeArea","hasBottomSafeArea","hasTopSafeArea","theme","style","children","rest","backgroundColor","colors","background","edges","push","styles","container","scrollViewContainer","StyleSheet","create","flex","flexGrow","undefined","withTheme"],"sources":["ScreenContainer.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n StyleSheet,\n ScrollView,\n StyleProp,\n ViewStyle,\n View,\n} from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport type { Edge } from \"react-native-safe-area-context\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype ScreenContainerProps = {\n scrollable: boolean;\n hasSafeArea: boolean;\n hasTopSafeArea: boolean;\n hasBottomSafeArea: boolean;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n children?: React.ReactNode;\n};\n\nfunction ScreenContainer({\n scrollable = false,\n hasSafeArea = false,\n hasBottomSafeArea = false,\n hasTopSafeArea = false,\n theme,\n style,\n children,\n ...rest\n}: ScreenContainerProps) {\n const backgroundColor = theme.colors.background;\n\n const edges: Edge[] = [\"left\", \"right\"];\n if (hasSafeArea || hasTopSafeArea) {\n edges.push(\"top\");\n }\n\n if (hasSafeArea || hasBottomSafeArea) {\n edges.push(\"bottom\");\n }\n\n return (\n <SafeAreaView\n edges={edges}\n style={[\n styles.container,\n {\n backgroundColor,\n },\n ]}\n {...rest}\n >\n {scrollable ? (\n <ScrollView\n contentContainerStyle={[\n styles.scrollViewContainer,\n { backgroundColor },\n style,\n ]}\n >\n {children}\n </ScrollView>\n ) : (\n <View style={[styles.container, { backgroundColor }, style]}>\n {children}\n </View>\n )}\n </SafeAreaView>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n scrollViewContainer: {\n flexGrow: 1,\n flex: undefined,\n },\n});\n\nexport default withTheme(ScreenContainer);\n"],"mappings":";;;;;;AAAA;AACA;AAOA;AAEA;AAAuC;AAAA;AAAA;AAavC,SAASA,eAAe,OASC;EAAA,IATA;IACvBC,UAAU,GAAG,KAAK;IAClBC,WAAW,GAAG,KAAK;IACnBC,iBAAiB,GAAG,KAAK;IACzBC,cAAc,GAAG,KAAK;IACtBC,KAAK;IACLC,KAAK;IACLC,QAAQ;IACR,GAAGC;EACiB,CAAC;EACrB,MAAMC,eAAe,GAAGJ,KAAK,CAACK,MAAM,CAACC,UAAU;EAE/C,MAAMC,KAAa,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;EACvC,IAAIV,WAAW,IAAIE,cAAc,EAAE;IACjCQ,KAAK,CAACC,IAAI,CAAC,KAAK,CAAC;EACnB;EAEA,IAAIX,WAAW,IAAIC,iBAAiB,EAAE;IACpCS,KAAK,CAACC,IAAI,CAAC,QAAQ,CAAC;EACtB;EAEA,oBACE,oBAAC,wCAAY;IACX,KAAK,EAAED,KAAM;IACb,KAAK,EAAE,CACLE,MAAM,CAACC,SAAS,EAChB;MACEN;IACF,CAAC;EACD,GACED,IAAI,GAEPP,UAAU,gBACT,oBAAC,uBAAU;IACT,qBAAqB,EAAE,CACrBa,MAAM,CAACE,mBAAmB,EAC1B;MAAEP;IAAgB,CAAC,EACnBH,KAAK;EACL,GAEDC,QAAQ,CACE,gBAEb,oBAAC,iBAAI;IAAC,KAAK,EAAE,CAACO,MAAM,CAACC,SAAS,EAAE;MAAEN;IAAgB,CAAC,EAAEH,KAAK;EAAE,GACzDC,QAAQ,CAEZ,CACY;AAEnB;AAEA,MAAMO,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE;EACR,CAAC;EACDH,mBAAmB,EAAE;IACnBI,QAAQ,EAAE,CAAC;IACXD,IAAI,EAAEE;EACR;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAACtB,eAAe,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["maybeParseValue","value","undefined","isNumber","maybe","toNumber","Slider","Icon","leftIcon","rightIcon","leftIconColor","rightIconColor","defaultValue","minimumTrackTintColor","maximumTrackTintColor","thumbTintColor","minimumValue","maximumValue","tapToSeek","step","onValueChange","style","theme","rest","internalValue","setInternalValue","React","useState","useEffect","minTrackColor","colors","primary","maxTrackColor","light","thumbColor","leftIconThemeColor","rightIconThemeColor","parsedValue","handleSlidingComplete","newValue","styles","container","slider","StyleSheet","create","height","flexDirection","alignItems","flex","marginHorizontal","withTheme"],"
|
|
1
|
+
{"version":3,"names":["maybeParseValue","value","undefined","isNumber","maybe","toNumber","Slider","Icon","leftIcon","rightIcon","leftIconColor","rightIconColor","defaultValue","minimumTrackTintColor","maximumTrackTintColor","thumbTintColor","minimumValue","maximumValue","tapToSeek","step","onValueChange","style","theme","rest","internalValue","setInternalValue","React","useState","useEffect","minTrackColor","colors","primary","maxTrackColor","light","thumbColor","leftIconThemeColor","rightIconThemeColor","parsedValue","handleSlidingComplete","newValue","styles","container","slider","StyleSheet","create","height","flexDirection","alignItems","flex","marginHorizontal","withTheme"],"sources":["Slider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet, StyleProp, ViewStyle } from \"react-native\";\nimport NativeSlider from \"@react-native-community/slider\";\nimport isNumber from \"lodash.isnumber\";\nimport toNumber from \"lodash.tonumber\";\n\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\nexport type Props = {\n style?: StyleProp<ViewStyle>;\n value?: number;\n defaultValue?: number;\n minimumTrackTintColor: string;\n maximumTrackTintColor: string;\n leftIcon?: string;\n rightIcon?: string;\n leftIconColor?: string;\n rightIconColor?: string;\n thumbTintColor?: string;\n tapToSeek?: boolean;\n minimumValue: number;\n maximumValue: number;\n step: number;\n onValueChange?: (value: number) => void;\n theme: Theme;\n} & IconSlot;\n\nfunction maybeParseValue(value: any) {\n if (value === undefined) {\n return undefined;\n }\n\n if (isNumber(value)) {\n return value;\n }\n\n try {\n const maybe = toNumber(value);\n if (isNumber(maybe)) {\n return maybe;\n }\n } catch {\n return undefined;\n }\n\n return undefined;\n}\n\nfunction Slider({\n Icon,\n leftIcon,\n rightIcon,\n leftIconColor,\n rightIconColor,\n value,\n defaultValue,\n minimumTrackTintColor,\n maximumTrackTintColor,\n thumbTintColor,\n minimumValue = 0,\n maximumValue = 100,\n tapToSeek,\n step = 1,\n onValueChange = () => {},\n style,\n theme,\n ...rest\n}: Props) {\n const [internalValue, setInternalValue] = React.useState<number | undefined>(\n value || defaultValue\n );\n\n React.useEffect(() => {\n if (value != null) {\n setInternalValue(value);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setInternalValue(defaultValue);\n }\n }, [defaultValue]);\n\n const minTrackColor = minimumTrackTintColor || theme.colors.primary;\n const maxTrackColor = maximumTrackTintColor || theme.colors.light;\n const thumbColor = thumbTintColor || theme.colors.primary;\n\n const leftIconThemeColor = leftIconColor || theme.colors.light;\n const rightIconThemeColor = rightIconColor || theme.colors.light;\n\n const parsedValue = maybeParseValue(internalValue);\n\n const handleSlidingComplete = (newValue: number) => {\n setInternalValue(newValue);\n onValueChange(newValue);\n };\n\n return (\n <View style={[styles.container, style]} {...rest}>\n {leftIcon ? (\n <Icon color={leftIconThemeColor} name={leftIcon} size={24} />\n ) : null}\n <NativeSlider\n value={parsedValue}\n step={step}\n minimumValue={minimumValue}\n maximumValue={maximumValue}\n tapToSeek={tapToSeek}\n minimumTrackTintColor={minTrackColor}\n maximumTrackTintColor={maxTrackColor}\n thumbTintColor={thumbColor}\n onSlidingComplete={handleSlidingComplete}\n style={styles.slider}\n />\n {rightIcon ? (\n <Icon color={rightIconThemeColor} name={rightIcon} size={24} />\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n height: 40,\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n slider: {\n flex: 1,\n marginHorizontal: 12,\n },\n});\n\nexport default withTheme(Slider);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AAAuC;AAAA;AAAA;AAAA;AAuBvC,SAASA,eAAe,CAACC,KAAU,EAAE;EACnC,IAAIA,KAAK,KAAKC,SAAS,EAAE;IACvB,OAAOA,SAAS;EAClB;EAEA,IAAI,IAAAC,eAAQ,EAACF,KAAK,CAAC,EAAE;IACnB,OAAOA,KAAK;EACd;EAEA,IAAI;IACF,MAAMG,KAAK,GAAG,IAAAC,gBAAQ,EAACJ,KAAK,CAAC;IAC7B,IAAI,IAAAE,eAAQ,EAACC,KAAK,CAAC,EAAE;MACnB,OAAOA,K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AAW,GAAGrC,eAAe,CAACwB,aAAa,CAAC;EAElD,MAAMc,qBAAqB,GAAIC,QAAgB,IAAK;IAClDd,gBAAgB,CAACc,QAAQ,CAAC;IAC1BnB,aAAa,CAACmB,QAAQ,CAAC;EACzB,CAAC;EAED,oBACE,oBAAC,iBAAI;IAAC,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAEpB,KAAK;EAAE,GAAKE,IAAI,GAC7Cf,QAAQ,gBACP,oBAAC,IAAI;IAAC,KAAK,EAAE2B,kBAAmB;IAAC,IAAI,EAAE3B,QAAS;IAAC,IAAI,EAAE;EAAG,EAAG,GAC3D,IAAI,eACR,oBAAC,eAAY;IACX,KAAK,EAAE6B,WAAY;IACnB,IAAI,EAAElB,IAAK;IACX,YAAY,EAAEH,YAAa;IAC3B,YAAY,EAAEC,YAAa;IAC3B,SAAS,EAAEC,SAAU;IACrB,qBAAqB,EAAEW,aAAc;IACrC,qBAAqB,EAAEG,aAAc;IACrC,cAAc,EAAEE,UAAW;IAC3B,iBAAiB,EAAEI,qBAAsB;IACzC,KAAK,EAAEE,MAAM,CAACE;EAAO,EACrB,EACDjC,SAAS,gBACR,oBAAC,IAAI;IAAC,KAAK,EAAE2B,mBAAoB;IAAC,IAAI,EAAE3B,SAAU;IAAC,IAAI,EAAE;EAAG,EAAG,GAC7D,IAAI,CACH;AAEX;AAEA,MAAM+B,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,MAAM,EAAE,EAAE;IACVC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EACDL,MAAM,EAAE;IACNM,IAAI,EAAE,CAAC;IACPC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAAC5C,MAAM,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StarRating","Icon","starSize","maxStars","rating","defaultValue","isEditable","activeColor","inactiveColor","style","onPress","rest","localRating","setLocalRating","React","useState","useEffect","ratingHandler","useCallback","r","ratingRounded","Math","round","styles","container","Array","map","_","i","display","touchContainer","pressable","StyleSheet","create","flexDirection","alignItems","position","top","right","left","bottom","zIndex","flex","height","width","withTheme"],"
|
|
1
|
+
{"version":3,"names":["StarRating","Icon","starSize","maxStars","rating","defaultValue","isEditable","activeColor","inactiveColor","style","onPress","rest","localRating","setLocalRating","React","useState","useEffect","ratingHandler","useCallback","r","ratingRounded","Math","round","styles","container","Array","map","_","i","display","touchContainer","pressable","StyleSheet","create","flexDirection","alignItems","position","top","right","left","bottom","zIndex","flex","height","width","withTheme"],"sources":["StarRating.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Pressable,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\ntype Props = {\n starSize?: number;\n maxStars?: number;\n rating?: number;\n defaultValue?: number;\n isEditable?: boolean;\n activeColor?: string;\n inactiveColor?: string;\n theme: Theme;\n style?: StyleProp<ViewStyle>;\n onPress?: (newValue: number) => void;\n} & IconSlot;\n\nconst StarRating: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n starSize = 16,\n maxStars = 5,\n rating = 0,\n defaultValue,\n isEditable = false,\n activeColor,\n inactiveColor,\n style,\n onPress,\n ...rest\n}) => {\n const [localRating, setLocalRating] = React.useState<number>(\n rating || defaultValue || 0\n );\n\n React.useEffect(() => {\n if (rating != null) {\n setLocalRating(rating);\n }\n }, [rating]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setLocalRating(defaultValue);\n }\n }, [defaultValue]);\n\n const ratingHandler = React.useCallback(\n (r: number) => {\n setLocalRating(r);\n !!onPress && onPress(r);\n },\n [onPress]\n );\n\n const ratingRounded = Math.round(localRating * 2) / 2;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n {[...Array(maxStars)].map((_, i) => (\n <View key={i} style={{ display: \"flex\" }}>\n <Icon\n name={\n ratingRounded - i === 0.5\n ? \"MaterialIcons/star-half\"\n : \"MaterialIcons/star\"\n }\n size={starSize}\n color={ratingRounded > i ? activeColor : inactiveColor}\n />\n {isEditable && (\n <View style={styles.touchContainer}>\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 0.5)}\n />\n <Pressable\n style={styles.pressable}\n onPress={() => ratingHandler(i + 1)}\n />\n </View>\n )}\n </View>\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n touchContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n position: \"absolute\",\n top: 0,\n right: 0,\n left: 0,\n bottom: 0,\n zIndex: 1,\n },\n pressable: {\n flex: 1,\n height: \"100%\",\n width: \"50%\",\n },\n});\n\nexport default withTheme(StarRating);\n"],"mappings":";;;;;;AAAA;AACA;AAOA;AAAuC;AAAA;AAAA;AAiBvC,MAAMA,UAAoD,GAAG,QAYvD;EAAA,IAZwD;IAC5DC,IAAI;IACJC,QAAQ,GAAG,EAAE;IACbC,QAAQ,GAAG,CAAC;IACZC,MAAM,GAAG,CAAC;IACVC,YAAY;IACZC,UAAU,GAAG,KAAK;IAClBC,WAAW;IACXC,aAAa;IACbC,KAAK;IACLC,OAAO;IACP,GAAGC;EACL,CAAC;EACC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAClDX,MAAM,IAAIC,YAAY,IAAI,CAAC,CAC5B;EAEDS,KAAK,CAACE,SAAS,CAAC,MAAM;IACpB,IAAIZ,MAAM,IAAI,IAAI,EAAE;MAClBS,cAAc,CAACT,MAAM,CAAC;IACxB;EACF,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZU,KAAK,CAACE,SAAS,CAAC,MAAM;IACpB,IAAIX,YAAY,IAAI,IAAI,EAAE;MACxBQ,cAAc,CAACR,YA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C/BT,SAAS,EAAE;IACTU,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EACDL,cAAc,EAAE;IACdD,OAAO,EAAE,MAAM;IACfK,aAAa,EAAE,KAAK;IACpBE,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE;EACV,CAAC;EACDV,SAAS,EAAE;IACTW,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAAC7C,UAAU,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Stepper","min","Infinity","max","value","valueProp","defaultValue","style","typeStyle","iconSize","iconColor","onChange","theme","colors","typography","Icon","setValue","useState","isValidValue","valueArg","handlePlusOrMinus","type","newValue","useEffect","isNumber","flexDirection","opacity","body1","textAlign","alignSelf","color","medium","marginHorizontal","withTheme"],"
|
|
1
|
+
{"version":3,"names":["Stepper","min","Infinity","max","value","valueProp","defaultValue","style","typeStyle","iconSize","iconColor","onChange","theme","colors","typography","Icon","setValue","useState","isValidValue","valueArg","handlePlusOrMinus","type","newValue","useEffect","isNumber","flexDirection","opacity","body1","textAlign","alignSelf","color","medium","marginHorizontal","withTheme"],"sources":["Stepper.tsx"],"sourcesContent":["import React, { FC, useEffect, useState } from \"react\";\nimport { View, Text, StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport { isNumber } from \"lodash\";\n\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\nimport IconButton from \"./IconButton\";\n\ntype Props = {\n min: number;\n max: number;\n value?: number;\n defaultValue?: number;\n style?: StyleProp<ViewStyle>;\n typeStyle?: StyleProp<TextStyle>;\n iconSize: number;\n iconColor?: string;\n onChange?: (value: number) => void;\n theme: Theme;\n} & IconSlot;\n\nconst Stepper: FC<Props> = ({\n min = -Infinity,\n max = Infinity,\n value: valueProp,\n defaultValue,\n style,\n typeStyle,\n iconSize = 24,\n iconColor,\n onChange,\n theme: { colors, typography },\n Icon,\n}) => {\n const [value, setValue] = useState(defaultValue ?? 0);\n\n const isValidValue = (valueArg: number) => valueArg >= min && valueArg <= max;\n\n const handlePlusOrMinus = (type: \"plus\" | \"minus\") => {\n const newValue = type === \"plus\" ? value + 1 : value - 1;\n\n if (isValidValue(newValue)) {\n setValue(newValue);\n onChange?.(newValue);\n }\n };\n\n useEffect(() => {\n if (\n valueProp != null &&\n isNumber(valueProp) &&\n valueProp !== value &&\n isValidValue(valueProp)\n ) {\n setValue(valueProp);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [valueProp]);\n\n return (\n <View style={[{ flexDirection: \"row\" }, style]}>\n <IconButton\n Icon={Icon}\n icon=\"MaterialIcons/remove\"\n onPress={() => handlePlusOrMinus(\"minus\")}\n size={iconSize}\n color={iconColor}\n disabled={value === min}\n style={{ opacity: value === min ? 0.5 : 1 }}\n />\n\n <Text\n style={[\n typography.body1,\n {\n textAlign: \"center\",\n alignSelf: \"center\",\n color: colors.medium,\n marginHorizontal: 8,\n },\n typeStyle,\n ]}\n >\n {value}\n </Text>\n\n <IconButton\n Icon={Icon}\n icon=\"MaterialIcons/add\"\n onPress={() => handlePlusOrMinus(\"plus\")}\n size={iconSize}\n color={iconColor}\n disabled={value === max}\n style={{ opacity: value === max ? 0.5 : 1 }}\n />\n </View>\n );\n};\n\nexport default withTheme(Stepper);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAEA;AAGA;AAAsC;AAAA;AAAA;AAetC,MAAMA,OAAkB,GAAG,QAYrB;EAAA,IAZsB;IAC1BC,GAAG,GAAG,CAACC,QAAQ;IACfC,GAAG,GAAGD,QAAQ;IACdE,KAAK,EAAEC,SAAS;IAChBC,YAAY;IACZC,KAA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E;MAAEyB,OAAO,EAAEtB,KAAK,KAAKH,GAAG,GAAG,GAAG,GAAG;IAAE;EAAE,EAC5C,eAEF,6BAAC,iBAAI;IACH,KAAK,EAAE,CACLa,UAAU,CAACa,KAAK,EAChB;MACEC,SAAS,EAAE,QAAQ;MACnBC,SAAS,EAAE,QAAQ;MACnBC,KAAK,EAAEjB,MAAM,CAACkB,MAAM;MACpBC,gBAAgB,EAAE;IACpB,CAAC,EACDxB,SAAS;EACT,GAEDJ,KAAK,CACD,eAEP,6BAAC,mBAAU;IACT,IAAI,EAAEW,IAAK;IACX,IAAI,EAAC,mBAAmB;IACxB,OAAO,EAAE,MAAMK,iBAAiB,CAAC,MAAM,CAAE;IACzC,IAAI,EAAEX,QAAS;IACf,KAAK,EAAEC,SAAU;IACjB,QAAQ,EAAEN,KAAK,KAAKD,GAAI;IACxB,KAAK,EAAE;MAAEuB,OAAO,EAAEtB,KAAK,KAAKD,GAAG,GAAG,GAAG,GAAG;IAAE;EAAE,EAC5C,CACG;AAEX,CAAC;AAAC,eAEa,IAAA8B,kBAAS,EAACjC,OAAO,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Surface","elevation","propElevation","style","theme","children","rest","styleElevation","backgroundColor","restStyle","StyleSheet","flatten","dark","isDarkTheme","mode","colors","evalationStyles","shadow","getBackgroundColor","overlay","surface","withTheme"],"
|
|
1
|
+
{"version":3,"names":["Surface","elevation","propElevation","style","theme","children","rest","styleElevation","backgroundColor","restStyle","StyleSheet","flatten","dark","isDarkTheme","mode","colors","evalationStyles","shadow","getBackgroundColor","overlay","surface","withTheme"],"sources":["Surface.tsx"],"sourcesContent":["/* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */\nimport * as React from \"react\";\nimport {\n Animated,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport shadow from \"../styles/shadow\";\nimport overlay from \"../styles/overlay\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & ViewProps;\n\nconst Surface: React.FC<React.PropsWithChildren<Props>> = ({\n elevation: propElevation,\n style,\n theme,\n children,\n ...rest\n}) => {\n const {\n elevation: styleElevation = 3,\n backgroundColor,\n ...restStyle\n } = (StyleSheet.flatten(style) || {}) as ViewStyle;\n\n const { dark: isDarkTheme, mode, colors } = theme;\n\n const elevation = propElevation || styleElevation;\n\n const evalationStyles = elevation ? shadow(elevation) : {};\n\n const getBackgroundColor = () => {\n if (backgroundColor) {\n return backgroundColor;\n } else if (isDarkTheme && mode === \"adaptive\") {\n return overlay(elevation, colors.surface);\n } else {\n return colors.surface;\n }\n };\n\n return (\n <Animated.View\n {...rest}\n style={[\n {\n backgroundColor: getBackgroundColor(),\n elevation,\n ...evalationStyles,\n ...restStyle,\n },\n ]}\n >\n {children}\n </Animated.View>\n );\n};\n\nexport default withTheme(Surface);\n"],"mappings":";;;;;;AACA;AACA;AAQA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AASvC,MAAMA,OAAiD,GAAG,QAMpD;EAAA,IANqD;IACzDC,SAAS,EAAEC,aAAa;IACxBC,KAAK;IACLC,KAAK;IACLC,QAAQ;IACR,GAAGC;EACL,CAAC;EACC,MAAM;IACJL,SAAS,EAAEM,cAAc,GAAG,CAAC;IAC7BC,eAAe;IACf,GAAGC;EACL,CAAC,GAAIC,uBAAU,CAACC,OAAO,CAACR,KAAK,CAAC,IAAI,CAAC,CAAe;EAElD,MAAM;IAAES,IAAI,EAAEC,WAAW;IAAEC,IAAI;IAAEC;EAAO,CAAC,GAAGX,KAAK;EAEjD,MAAMH,SAAS,GAAGC,aAAa,IAAIK,cAAc;EAEjD,MAAMS,eAAe,GAAGf,SAAS,GAAG,IAAAgB,eAAM,EAAChB,SAAS,CAAC,GAAG,CAAC,CAAC;EAE1D,MAAMiB,kBAAkB,GAAG,MAAM;IAC/B,IAAIV,eAAe,EAAE;MACnB,OAAOA,eAAe;IACxB,CAAC,MAAM,IAAIK,WAAW,IAAIC,IAAI,KAAK,UAAU,EAAE;MAC7C,OAAO,IAAAK,gBAAO,EAAClB,SAAS,EAAEc,MAAM,CAACK,OAAO,CAAC;IAC3C,CAAC,MAAM;MACL,OAAOL,MAAM,CAACK,OAAO;IACvB;EACF,CAAC;EAED,oBACE,oBAAC,qBAAQ,CAAC,IAAI,eACRd,IAAI;IACR,KAAK,EAAE,CACL;MACEE,eAAe,EAAEU,kBAAkB,EAAE;MACrCjB,SAAS;MACT,GAAGe,eAAe;MAClB,GAAGP;IACL,CAAC;EACD,IAEDJ,QAAQ,CACK;AAEpB,CAAC;AAAC,eAEa,IAAAgB,kBAAS,EAACrB,OAAO,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","data","keyExtractor","renderItem","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle","map","item","index","component","key","React","cloneElement"],"
|
|
1
|
+
{"version":3,"names":["Swiper","vertical","loop","timeout","from","prevTitle","nextTitle","prevTitleColor","nextTitleColor","dotsTouchable","dotColor","dotActiveColor","data","keyExtractor","renderItem","children","style","prevTitleStyle","color","nextTitleStyle","dotProps","badgeStyle","backgroundColor","dotActiveStyle","map","item","index","component","key","React","cloneElement"],"sources":["Swiper.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport SwiperComponent from \"react-native-web-swiper\";\n\nexport interface SwiperProps<T> {\n vertical?: boolean;\n loop?: boolean;\n from?: number;\n timeout?: number;\n prevTitle?: string;\n nextTitle?: string;\n prevTitleColor?: string;\n nextTitleColor?: string;\n dotsTouchable?: boolean;\n dotColor?: string;\n dotActiveColor?: string;\n children: React.ReactNode;\n data?: Array<T>;\n keyExtractor: (item: T, index: number) => string;\n renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Swiper = ({\n vertical = false,\n loop = false,\n timeout = 0,\n from = 0,\n prevTitle = \"\",\n nextTitle = \"\",\n prevTitleColor,\n nextTitleColor,\n dotsTouchable = true,\n dotColor,\n dotActiveColor,\n data,\n keyExtractor,\n renderItem,\n children,\n style,\n}: SwiperProps<any>) => (\n <View style={style}>\n {/* @ts-ignore */}\n <SwiperComponent\n from={from}\n loop={loop}\n timeout={timeout}\n vertical={vertical}\n controlsProps={{\n prevTitle,\n nextTitle,\n prevTitleStyle: { color: prevTitleColor },\n nextTitleStyle: { color: nextTitleColor },\n dotsTouchable,\n ...(dotColor\n ? { dotProps: { badgeStyle: { backgroundColor: dotColor } } }\n : {}),\n ...(dotActiveColor\n ? { dotActiveStyle: { backgroundColor: dotActiveColor } }\n : {}),\n }}\n >\n {data && renderItem\n ? data.map((item, index) => {\n const component = renderItem({ item, index });\n\n if (!component) {\n return null;\n }\n\n const key = keyExtractor ? keyExtractor(item, index) : index;\n return React.cloneElement(component, {\n key,\n });\n })\n : children}\n </SwiperComponent>\n </View>\n);\n\nexport default Swiper;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAsD;AAqBtD,MAAMA,MAAM,GAAG;EAAA,IAAC;IACdC,QAAQ,GAAG,KAAK;IAChBC,IAAI,GAAG,KAAK;IACZC,OAAO,GAAG,CAAC;IACXC,IAAI,GAAG,CAAC;IACRC,SAAS,GAAG,EAAE;IACdC,SAAS,GAAG,EAAE;IACdC,cAAc;IACdC,cAAc;IACdC,aAAa,GAAG,IAAI;IACpBC,QAAQ;IACRC,cAAc;IACdC,IAAI;IACJC,YAAY;IACZC,UAAU;IACVC,QAAQ;IACRC;EACgB,CAAC;EAAA,oBACjB,6BAAC,iBAAI;IAAC,KAAK,EAAEA;EAAM,gBAEjB,6BAAC,6BAAe;IACd,IAAI,EAAEZ,IAAK;IACX,IAAI,EAAEF,IAAK;IACX,OAAO,EAAEC,OAAQ;IACjB,QAAQ,EAAEF,QAAS;IACnB,aAAa,EAAE;MACbI,SAAS;MACTC,SAAS;MACTW,cAAc,EAAE;QAAEC,KAAK,EAAEX;MAAe,CAAC;MACzCY,cAAc,EAAE;QAAED,KAAK,EAAEV;MAAe,CAAC;MACzCC,aAAa;MACb,IAAIC,QAAQ,GACR;QAAEU,QAAQ,EAAE;UAAEC,UAAU,EAAE;YAAEC,eAAe,EAAEZ;UAAS;QAAE;MAAE,CAAC,GAC3D,CAAC,CAAC,CAAC;MACP,IAAIC,cAAc,GACd;QAAEY,cAAc,EAAE;UAAED,eAAe,EAAEX;QAAe;MAAE,CAAC,GACvD,CAAC,CAAC;IACR;EAAE,GAEDC,IAAI,IAAIE,UAAU,GACfF,IAAI,CAACY,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;IACxB,MAAMC,SAAS,GAAGb,UAAU,CAAC;MAAEW,IAAI;MAAEC;IAAM,CAAC,CAAC;IAE7C,IAAI,CAACC,SAAS,EAAE;MACd,OAAO,IAAI;IACb;IAEA,MAAMC,GAAG,GAAGf,YAAY,GAAGA,YAAY,CAACY,IAAI,EAAEC,KAAK,CAAC,GAAGA,KAAK;IAC5D,oBAAOG,cAAK,CAACC,YAAY,CAACH,SAAS,EAAE;MACnCC;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,GACFb,QAAQ,CACI,CACb;AAAA,CACR;AAAC,eAEaf,MAAM;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["styles","StyleSheet","create","wrapper","flex","SwiperItem","children","style"],"
|
|
1
|
+
{"version":3,"names":["styles","StyleSheet","create","wrapper","flex","SwiperItem","children","style"],"sources":["SwiperItem.tsx"],"sourcesContent":["import React from \"react\";\nimport { View, StyleSheet, StyleProp, ViewStyle } from \"react-native\";\n\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n },\n});\n\nexport interface SwiperProps {\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n}\n\nconst SwiperItem = ({ children, style }: SwiperProps) => (\n <View style={[styles.wrapper, style]}>{children}</View>\n);\n\nexport default SwiperItem;\n"],"mappings":";;;;;;AAAA;AACA;AAAsE;AAEtE,MAAMA,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,OAAO,EAAE;IACPC,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAOF,MAAMC,UAAU,GAAG;EAAA,IAAC;IAAEC,QAAQ;IAAEC;EAAmB,CAAC;EAAA,oBAClD,6BAAC,iBAAI;IAAC,KAAK,EAAE,CAACP,MAAM,CAACG,OAAO,EAAEI,KAAK;EAAE,GAAED,QAAQ,CAAQ;AAAA,CACxD;AAAC,eAEaD,UAAU;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export { default as Swiper } from \"./Swiper\";\nexport { default as SwiperItem } from \"./SwiperItem\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AAAqD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Switch","value","defaultValue","disabled","onValueChange","activeTrackColor","inactiveTrackColor","activeThumbColor","inactiveThumbColor","theme","style","rest","activeTrackThemeColor","colors","primary","inactiveTrackThemeColor","activeThumbThemeColor","inactiveThumbThemeColor","checked","setChecked","React","useState","useEffect","previousDefaultValue","usePrevious","Boolean","false","true","bool","Row","label","direction","RowDirection","SwitchRow","withTheme"],"
|
|
1
|
+
{"version":3,"names":["Switch","value","defaultValue","disabled","onValueChange","activeTrackColor","inactiveTrackColor","activeThumbColor","inactiveThumbColor","theme","style","rest","activeTrackThemeColor","colors","primary","inactiveTrackThemeColor","activeThumbThemeColor","inactiveThumbThemeColor","checked","setChecked","React","useState","useEffect","previousDefaultValue","usePrevious","Boolean","false","true","bool","Row","label","direction","RowDirection","SwitchRow","withTheme"],"sources":["Switch.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Switch as NativeSwitch,\n SwitchProps,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport FormRow from \"./FormRow\";\nimport { RowDirection } from \"@draftbit/types\";\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport { usePrevious } from \"../hooks\";\n\ntype Props = {\n value?: boolean;\n disabled?: boolean;\n onValueChange?: (value: boolean) => void;\n defaultValue?: boolean;\n theme: Theme;\n activeTrackColor: string;\n inactiveTrackColor: string;\n activeThumbColor: string;\n inactiveThumbColor: string;\n} & SwitchProps;\n\nfunction Switch({\n value,\n defaultValue,\n disabled,\n onValueChange,\n activeTrackColor,\n inactiveTrackColor,\n activeThumbColor,\n inactiveThumbColor,\n theme,\n style,\n ...rest\n}: Props) {\n const activeTrackThemeColor = activeTrackColor || theme.colors.primary;\n const inactiveTrackThemeColor = inactiveTrackColor || \"#EEE\";\n\n const activeThumbThemeColor = activeThumbColor || \"#FFF\";\n const inactiveThumbThemeColor = inactiveThumbColor || \"#FFF\";\n\n const [checked, setChecked] = React.useState(value || defaultValue);\n\n React.useEffect(() => {\n if (value != null && value !== checked) {\n setChecked(value);\n }\n }, [value, checked]);\n\n // This special logic is to handle weird APIs like Airtable that return\n // true or undefined for a boolean\n const previousDefaultValue = usePrevious(defaultValue) as boolean | undefined;\n React.useEffect(() => {\n if (defaultValue !== previousDefaultValue) {\n setChecked(Boolean(defaultValue));\n }\n }, [defaultValue, previousDefaultValue]);\n\n return (\n <NativeSwitch\n value={checked}\n disabled={disabled}\n trackColor={{\n false: inactiveTrackThemeColor,\n true: activeTrackThemeColor,\n }}\n thumbColor={value ? activeThumbThemeColor : inactiveThumbThemeColor}\n // @ts-ignore react-native-web only\n activeThumbColor={activeThumbThemeColor}\n ios_backgroundColor={inactiveTrackThemeColor}\n style={style}\n onValueChange={(bool) => {\n setChecked(bool);\n onValueChange && onValueChange(bool);\n }}\n {...rest}\n />\n );\n}\n\ntype RowProps = {\n label: string;\n direction: RowDirection;\n style?: StyleProp<ViewStyle>;\n};\n\nfunction Row({\n label = \"Label\",\n direction = RowDirection.Row,\n style,\n value,\n defaultValue,\n disabled,\n onValueChange,\n activeTrackColor,\n inactiveTrackColor,\n activeThumbColor,\n inactiveThumbColor,\n theme,\n ...rest\n}: Props & RowProps) {\n const [checked, setChecked] = React.useState(\n value != null ? value : defaultValue\n );\n\n React.useEffect(() => {\n if (value != null) {\n setChecked(value);\n }\n }, [value]);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setChecked(defaultValue);\n }\n }, [defaultValue]);\n\n return (\n <FormRow\n disabled={disabled}\n onPress={() => {\n setChecked(!checked);\n onValueChange && onValueChange(!checked);\n }}\n label={label}\n direction={direction}\n style={style}\n {...rest}\n >\n <Switch\n theme={theme}\n value={checked}\n disabled={disabled}\n onValueChange={onValueChange}\n activeTrackColor={activeTrackColor}\n inactiveTrackColor={inactiveTrackColor}\n activeThumbColor={activeThumbColor}\n inactiveThumbColor={inactiveThumbColor}\n />\n </FormRow>\n );\n}\n\nconst SwitchRow = withTheme(Row);\nexport { SwitchRow };\nexport default withTheme(Switch);\n"],"mappings":";;;;;;AAAA;AACA;AAMA;AACA;AACA;AAEA;AAAuC;AAAA;AAAA;AAAA;AAcvC,SAASA,MAAM,OAYL;EAAA,IAZM;IACdC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRC,aAAa;IACbC,gBAAgB;IAChBC,kBAAkB;IAClBC,gBAAgB;IAChBC,kBAAkB;IAClBC,KAAK;IACLC,KAAK;IACL,GAAGC;EACE,CAAC;EACN,MAAMC,qBAAqB,GAAGP,gBAAgB,IAAII,KAAK,CAACI,MAAM,CAACC,OAAO;EACtE,MAAMC,uBAAuB,GAAGT,kBAAkB,IAAI,MAAM;EAE5D,MAAMU,qBAAqB,GAAGT,gBAAgB,IAAI,MAAM;EACxD,MAAMU,uBAAuB,GAAGT,kBAAkB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ClBC,gBAAgB;IAChBC,kBAAkB;IAClBC,KAAK;IACL,GAAGE;EACa,CAAC;EACjB,MAAM,CAACO,OAAO,EAAEC,UAAU,CAAC,GAAGC,KAAK,CAACC,QAAQ,CAC1CpB,KAAK,IAAI,IAAI,GAAGA,KAAK,GAAGC,YAAY,CACrC;EAEDkB,KAAK,CAACE,SAAS,CAAC,MAAM;IACpB,IAAIrB,KAAK,IAAI,IAAI,EAAE;MACjBkB,UAAU,CAAClB,KAAK,CAAC;IACnB;EACF,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEXmB,KAAK,CAACE,SAAS,CAAC,MAAM;IACpB,IAAIpB,YAAY,IAAI,IAAI,EAAE;MACxBiB,UAAU,CAACjB,YAAY,CAAC;IAC1B;EACF,CAAC,EAAE,CAACA,YAAY,CAAC,CAAC;EAElB,oBACE,oBAAC,gBAAO;IACN,QAAQ,EAAEC,QAAS;IACnB,OAAO,EAAE,MAAM;MACbgB,UAAU,CAAC,CAACD,OAAO,CAAC;MACpBd,aAAa,IAAIA,aAAa,CAAC,CAACc,OAAO,CAAC;IAC1C,CAAE;IACF,KAAK,EAAEY,KAAM;IACb,SAAS,EAAEC,SAAU;IACrB,KAAK,EAAErB;EAAM,GACTC,IAAI,gBAER,oBAAC,MAAM;IACL,KAAK,EAAEF,KAAM;IACb,KAAK,EAAES,OAAQ;IACf,QAAQ,EAAEf,QAAS;IACnB,aAAa,EAAEC,aAAc;IAC7B,gBAAgB,EAAEC,gBAAiB;IACnC,kBAAkB,EAAEC,kBAAmB;IACvC,gBAAgB,EAAEC,gBAAiB;IACnC,kBAAkB,EAAEC;EAAmB,EACvC,CACM;AAEd;AAEA,MAAMyB,SAAS,GAAG,IAAAC,kBAAS,EAACL,GAAG,CAAC;AAAC;AAAA,eAElB,IAAAK,kBAAS,EAAClC,MAAM,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Text","React","Component","nativeProps","setNativeProps","args","state","render","style","rest","props","writingDirection","I18nManager","isRTL","c","_root","textAlign","BaseLink","theme","title","color","colors","primary","Link","withTheme"],"
|
|
1
|
+
{"version":3,"names":["Text","React","Component","nativeProps","setNativeProps","args","state","render","style","rest","props","writingDirection","I18nManager","isRTL","c","_root","textAlign","BaseLink","theme","title","color","colors","primary","Link","withTheme"],"sources":["Text.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Text as NativeText, I18nManager, TextProps } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n theme: Theme;\n} & TextProps;\n\nclass Text extends React.Component<Props> {\n _root: any;\n\n state: any = {\n nativeProps: {},\n };\n\n setNativeProps(args: TextProps) {\n this.state.nativeProps = args || {};\n }\n\n render() {\n const { style, ...rest } = this.props;\n const writingDirection = I18nManager.isRTL ? \"rtl\" : \"ltr\";\n\n return (\n <NativeText\n {...rest}\n {...this.state.nativeProps}\n ref={(c) => {\n this._root = c;\n }}\n style={[\n {\n textAlign: \"left\",\n writingDirection,\n },\n style,\n ]}\n />\n );\n }\n}\n\nexport const BaseLink = ({\n style,\n theme,\n title,\n ...props\n}: any): JSX.Element => {\n return (\n <Text\n hitSlop={8}\n style={[{ color: theme.colors.primary }, style]}\n theme={theme}\n {...props}\n >\n {title}\n </Text>\n );\n};\n\nconst Link: any = withTheme(BaseLink);\nexport { Link };\n\nexport default withTheme(Text);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvC,MAAMA,IAAI,SAASC,KAAK,CAACC,SAAS,CAAQ;EAAA;IAAA;IAAA;IAAA,+BAG3B;MACXC,WAAW,EAAE,CAAC;IAChB,CAAC;EAAA;EAEDC,cAAc,CAACC,IAAe,EAAE;IAC9B,IAAI,CAACC,KAAK,CAACH,WAAW,GAAGE,IAAI,IAAI,CAAC,CAAC;EACrC;EAEAE,MAAM,GAAG;IACP,MAAM;MAAEC,KAAK;MAAE,GAAGC;IAAK,CAAC,GAAG,IAAI,CAACC,KAAK;IACrC,MAAMC,gBAAgB,GAAGC,wBAAW,CAACC,KAAK,GAAG,KAAK,GAAG,KAAK;IAE1D,oBACE,oBAAC,iBAAU,eACLJ,IAAI,EACJ,IAAI,CAACH,KAAK,CAACH,WAAW;MAC1B,GAAG,EAAGW,CAAC,IAAK;QACV,IAAI,CAACC,KAAK,GAAGD,CAAC;MAChB,CAAE;MACF,KAAK,EAAE,CACL;QACEE,SAAS,EAAE,MAAM;QACjBL;MACF,CAAC,EACDH,KAAK;IACL,GACF;EAEN;AACF;AAEO,MAAMS,QAAQ,GAAG,QAKA;EAAA,IALC;IACvBT,KAAK;IACLU,KAAK;IACLC,KAAK;IACL,GAAGT;EACA,CAAC;EACJ,oBACE,oBAAC,IAAI;IACH,OAAO,EAAE,CAAE;IACX,KAAK,EAAE,CAAC;MAAEU,KAAK,EAAEF,KAAK,CAACG,MAAM,CAACC;IAAQ,CAAC,EAAEd,KAAK,CAAE;IAChD,KAAK,EAAEU;EAAM,GACTR,KAAK,GAERS,KAAK,CACD;AAEX,CAAC;AAAC;AAEF,MAAMI,IAAS,GAAG,IAAAC,kBAAS,EAACP,QAAQ,CAAC;AAAC;AAAA,eAGvB,IAAAO,kBAAS,EAACxB,IAAI,CAAC;AAAA"}
|