@draftbit/core 46.4.4-d93fe1.2 → 46.4.4-dc4ec4.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 +2 -10
- package/lib/commonjs/Provider.js.map +1 -0
- package/lib/commonjs/components/Accordion/AccordionGroup.js +2 -15
- package/lib/commonjs/components/Accordion/AccordionGroup.js.map +1 -0
- package/lib/commonjs/components/Accordion/AccordionItem.js +2 -14
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -0
- package/lib/commonjs/components/Accordion/index.js +2 -4
- package/lib/commonjs/components/Accordion/index.js.map +1 -0
- package/lib/commonjs/components/ActionSheet/ActionSheet.js +2 -10
- package/lib/commonjs/components/ActionSheet/ActionSheet.js.map +1 -0
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js +2 -6
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -0
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js +2 -8
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -0
- package/lib/commonjs/components/ActionSheet/index.js +2 -5
- package/lib/commonjs/components/ActionSheet/index.js.map +1 -0
- package/lib/commonjs/components/AnimatedCircularProgress.js +2 -16
- package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -0
- package/lib/commonjs/components/AspectRatio.js +2 -11
- package/lib/commonjs/components/AspectRatio.js.map +1 -0
- package/lib/commonjs/components/AvatarEdit.js +2 -13
- package/lib/commonjs/components/AvatarEdit.js.map +1 -0
- package/lib/commonjs/components/Banner.js +11 -24
- package/lib/commonjs/components/Banner.js.map +1 -0
- package/lib/commonjs/components/Button.js +4 -20
- package/lib/commonjs/components/Button.js.map +1 -0
- package/lib/commonjs/components/Card.js +2 -15
- package/lib/commonjs/components/Card.js.map +1 -0
- package/lib/commonjs/components/CardBlock.js +2 -16
- package/lib/commonjs/components/CardBlock.js.map +1 -0
- package/lib/commonjs/components/CardContainer.js +2 -19
- package/lib/commonjs/components/CardContainer.js.map +1 -0
- package/lib/commonjs/components/CardContainerRating.js +4 -21
- package/lib/commonjs/components/CardContainerRating.js.map +1 -0
- package/lib/commonjs/components/CardContainerShortImage.js +2 -13
- package/lib/commonjs/components/CardContainerShortImage.js.map +1 -0
- package/lib/commonjs/components/CardInline.js +3 -15
- package/lib/commonjs/components/CardInline.js.map +1 -0
- package/lib/commonjs/components/Carousel.js +5 -22
- package/lib/commonjs/components/Carousel.js.map +1 -0
- package/lib/commonjs/components/Checkbox/Checkbox.js +5 -19
- package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -0
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js +2 -12
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -0
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +2 -21
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -0
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +5 -25
- package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -0
- package/lib/commonjs/components/Checkbox/context.js +2 -6
- package/lib/commonjs/components/Checkbox/context.js.map +1 -0
- package/lib/commonjs/components/Checkbox/index.js +2 -5
- package/lib/commonjs/components/Checkbox/index.js.map +1 -0
- package/lib/commonjs/components/CircleImage.js +2 -10
- package/lib/commonjs/components/CircleImage.js.map +1 -0
- package/lib/commonjs/components/CircularProgress.js +5 -14
- package/lib/commonjs/components/CircularProgress.js.map +1 -0
- package/lib/commonjs/components/Config.js +7 -14
- package/lib/commonjs/components/Config.js.map +1 -0
- package/lib/commonjs/components/Container.js +6 -28
- package/lib/commonjs/components/Container.js.map +1 -0
- package/lib/commonjs/components/DatePicker/DatePicker.js +18 -49
- package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -0
- package/lib/commonjs/components/DatePicker/DatePickerComponent.js +2 -8
- package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -0
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js +2 -11
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -0
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js +2 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -0
- package/lib/commonjs/components/DeprecatedButton.js +2 -24
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -0
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -12
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -0
- package/lib/commonjs/components/DeprecatedFAB.js +2 -27
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -0
- package/lib/commonjs/components/Divider.js +2 -10
- package/lib/commonjs/components/Divider.js.map +1 -0
- package/lib/commonjs/components/Elevation.js +2 -12
- package/lib/commonjs/components/Elevation.js.map +1 -0
- package/lib/commonjs/components/FAB.js +2 -11
- package/lib/commonjs/components/FAB.js.map +1 -0
- package/lib/commonjs/components/FieldSearchBarFull.js +2 -19
- package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -0
- package/lib/commonjs/components/FormRow.js +2 -11
- package/lib/commonjs/components/FormRow.js.map +1 -0
- package/lib/commonjs/components/Header.js +2 -14
- package/lib/commonjs/components/Header.js.map +1 -0
- package/lib/commonjs/components/HeaderLarge.js +2 -10
- package/lib/commonjs/components/HeaderLarge.js.map +1 -0
- package/lib/commonjs/components/HeaderMedium.js +2 -10
- package/lib/commonjs/components/HeaderMedium.js.map +1 -0
- package/lib/commonjs/components/HeaderOverline.js +2 -10
- package/lib/commonjs/components/HeaderOverline.js.map +1 -0
- package/lib/commonjs/components/IconButton.js +2 -11
- package/lib/commonjs/components/IconButton.js.map +1 -0
- package/lib/commonjs/components/Image.js +2 -18
- package/lib/commonjs/components/Image.js.map +1 -0
- package/lib/commonjs/components/Justification.js +3 -3
- package/lib/commonjs/components/Justification.js.map +1 -0
- package/lib/commonjs/components/Layout.js +4 -13
- package/lib/commonjs/components/Layout.js.map +1 -0
- package/lib/commonjs/components/NumberInput.js +10 -22
- package/lib/commonjs/components/NumberInput.js.map +1 -0
- package/lib/commonjs/components/Picker/Picker.js +8 -40
- package/lib/commonjs/components/Picker/Picker.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.android.js +8 -24
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +10 -28
- package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js +8 -24
- package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerTypes.js +2 -1
- package/lib/commonjs/components/Picker/PickerTypes.js.map +1 -0
- package/lib/commonjs/components/Portal/Portal.js +6 -15
- package/lib/commonjs/components/Portal/Portal.js.map +1 -0
- package/lib/commonjs/components/Portal/PortalConsumer.js +7 -16
- package/lib/commonjs/components/Portal/PortalConsumer.js.map +1 -0
- package/lib/commonjs/components/Portal/PortalHost.js +6 -32
- package/lib/commonjs/components/Portal/PortalHost.js.map +1 -0
- package/lib/commonjs/components/Portal/PortalManager.js +9 -20
- package/lib/commonjs/components/Portal/PortalManager.js.map +1 -0
- package/lib/commonjs/components/ProgressBar.js +11 -46
- package/lib/commonjs/components/ProgressBar.js.map +1 -0
- package/lib/commonjs/components/ProgressCircle.js +2 -11
- package/lib/commonjs/components/ProgressCircle.js.map +1 -0
- package/lib/commonjs/components/ProgressIndicator.js +2 -10
- package/lib/commonjs/components/ProgressIndicator.js.map +1 -0
- package/lib/commonjs/components/RadioButton/RadioButton.js +3 -15
- package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -0
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +2 -11
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -0
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +2 -15
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -0
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +3 -22
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -0
- package/lib/commonjs/components/RadioButton/context.js +2 -6
- package/lib/commonjs/components/RadioButton/context.js.map +1 -0
- package/lib/commonjs/components/RadioButton/index.js +2 -6
- package/lib/commonjs/components/RadioButton/index.js.map +1 -0
- package/lib/commonjs/components/ResizeMode.js +3 -3
- package/lib/commonjs/components/ResizeMode.js.map +1 -0
- package/lib/commonjs/components/Row.js +2 -12
- package/lib/commonjs/components/Row.js.map +1 -0
- package/lib/commonjs/components/RowBodyIcon.js +2 -11
- package/lib/commonjs/components/RowBodyIcon.js.map +1 -0
- package/lib/commonjs/components/RowHeadlineImageCaption.js +4 -12
- package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -0
- package/lib/commonjs/components/RowHeadlineImageIcon.js +2 -11
- package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -0
- package/lib/commonjs/components/SVG.js +2 -10
- package/lib/commonjs/components/SVG.js.map +1 -0
- package/lib/commonjs/components/ScreenContainer.js +2 -15
- package/lib/commonjs/components/ScreenContainer.js.map +1 -0
- package/lib/commonjs/components/Slider.js +2 -22
- package/lib/commonjs/components/Slider.js.map +1 -0
- package/lib/commonjs/components/StarRating.js +2 -11
- package/lib/commonjs/components/StarRating.js.map +1 -0
- package/lib/commonjs/components/StepIndicator.js +7 -40
- package/lib/commonjs/components/StepIndicator.js.map +1 -0
- package/lib/commonjs/components/Stepper.js +6 -19
- package/lib/commonjs/components/Stepper.js.map +1 -0
- package/lib/commonjs/components/Surface.js +2 -15
- package/lib/commonjs/components/Surface.js.map +1 -0
- package/lib/commonjs/components/Swiper/Swiper.js +2 -9
- package/lib/commonjs/components/Swiper/Swiper.js.map +1 -0
- package/lib/commonjs/components/Swiper/SwiperItem.js +2 -7
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -0
- package/lib/commonjs/components/Swiper/index.js +2 -4
- package/lib/commonjs/components/Swiper/index.js.map +1 -0
- package/lib/commonjs/components/Switch.js +7 -19
- package/lib/commonjs/components/Switch.js.map +1 -0
- package/lib/commonjs/components/Text.js +10 -20
- package/lib/commonjs/components/Text.js.map +1 -0
- package/lib/commonjs/components/TextField.js +18 -63
- package/lib/commonjs/components/TextField.js.map +1 -0
- package/lib/commonjs/components/ToggleButton.js +2 -15
- package/lib/commonjs/components/ToggleButton.js.map +1 -0
- package/lib/commonjs/components/Touchable.js +18 -8
- package/lib/commonjs/components/Touchable.js.map +1 -0
- package/lib/commonjs/components/Touchable.web.js +2 -3
- package/lib/commonjs/components/Touchable.web.js.map +1 -0
- package/lib/commonjs/components/Typography.js +2 -6
- package/lib/commonjs/components/Typography.js.map +1 -0
- package/lib/commonjs/components/useAuthState.js +2 -10
- package/lib/commonjs/components/useAuthState.js.map +1 -0
- package/lib/commonjs/constants.js +2 -5
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/hooks.js +6 -8
- package/lib/commonjs/hooks.js.map +1 -0
- package/lib/commonjs/index.js +2 -67
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/interfaces/Icon.js +5 -6
- package/lib/commonjs/interfaces/Icon.js.map +1 -0
- package/lib/commonjs/mappings/Accordion.js +2 -3
- package/lib/commonjs/mappings/Accordion.js.map +1 -0
- package/lib/commonjs/mappings/AccordionItem.js +2 -3
- package/lib/commonjs/mappings/AccordionItem.js.map +1 -0
- package/lib/commonjs/mappings/ActionSheet.js +2 -3
- package/lib/commonjs/mappings/ActionSheet.js.map +1 -0
- package/lib/commonjs/mappings/ActionSheetCancel.js +2 -3
- package/lib/commonjs/mappings/ActionSheetCancel.js.map +1 -0
- package/lib/commonjs/mappings/ActionSheetItem.js +2 -3
- package/lib/commonjs/mappings/ActionSheetItem.js.map +1 -0
- package/lib/commonjs/mappings/ActivityIndicator.js +2 -3
- package/lib/commonjs/mappings/ActivityIndicator.js.map +1 -0
- package/lib/commonjs/mappings/AudioPlayer.js +2 -3
- package/lib/commonjs/mappings/AudioPlayer.js.map +1 -0
- package/lib/commonjs/mappings/AvatarEdit.js +2 -3
- package/lib/commonjs/mappings/AvatarEdit.js.map +1 -0
- package/lib/commonjs/mappings/Banner.js +2 -3
- package/lib/commonjs/mappings/Banner.js.map +1 -0
- package/lib/commonjs/mappings/BlurView.js +2 -3
- package/lib/commonjs/mappings/BlurView.js.map +1 -0
- package/lib/commonjs/mappings/Button.js +8 -6
- package/lib/commonjs/mappings/Button.js.map +1 -0
- package/lib/commonjs/mappings/Card.js +5 -5
- package/lib/commonjs/mappings/Card.js.map +1 -0
- package/lib/commonjs/mappings/CardBlock.js +8 -6
- package/lib/commonjs/mappings/CardBlock.js.map +1 -0
- package/lib/commonjs/mappings/CardContainer.js +7 -8
- package/lib/commonjs/mappings/CardContainer.js.map +1 -0
- package/lib/commonjs/mappings/CardContainerRating.js +6 -5
- package/lib/commonjs/mappings/CardContainerRating.js.map +1 -0
- package/lib/commonjs/mappings/CardContainerShortImage.js +2 -3
- package/lib/commonjs/mappings/CardContainerShortImage.js.map +1 -0
- package/lib/commonjs/mappings/CardInline.js +2 -3
- package/lib/commonjs/mappings/CardInline.js.map +1 -0
- package/lib/commonjs/mappings/Carousel.js +2 -3
- package/lib/commonjs/mappings/Carousel.js.map +1 -0
- package/lib/commonjs/mappings/Checkbox.js +2 -3
- package/lib/commonjs/mappings/Checkbox.js.map +1 -0
- package/lib/commonjs/mappings/CheckboxGroup.js +2 -3
- package/lib/commonjs/mappings/CheckboxGroup.js.map +1 -0
- package/lib/commonjs/mappings/CheckboxRow.js +2 -3
- package/lib/commonjs/mappings/CheckboxRow.js.map +1 -0
- package/lib/commonjs/mappings/CircleImage.js +2 -3
- package/lib/commonjs/mappings/CircleImage.js.map +1 -0
- package/lib/commonjs/mappings/Container.js +2 -3
- package/lib/commonjs/mappings/Container.js.map +1 -0
- package/lib/commonjs/mappings/CustomCode.js +2 -3
- package/lib/commonjs/mappings/CustomCode.js.map +1 -0
- package/lib/commonjs/mappings/DatePicker.js +6 -5
- package/lib/commonjs/mappings/DatePicker.js.map +1 -0
- package/lib/commonjs/mappings/Divider.js +2 -3
- package/lib/commonjs/mappings/Divider.js.map +1 -0
- package/lib/commonjs/mappings/FAB.js +2 -3
- package/lib/commonjs/mappings/FAB.js.map +1 -0
- package/lib/commonjs/mappings/Fetch.js +2 -3
- package/lib/commonjs/mappings/Fetch.js.map +1 -0
- package/lib/commonjs/mappings/FieldSearchBarFull.js +4 -4
- package/lib/commonjs/mappings/FieldSearchBarFull.js.map +1 -0
- package/lib/commonjs/mappings/FlashList.js +2 -3
- package/lib/commonjs/mappings/FlashList.js.map +1 -0
- package/lib/commonjs/mappings/FlatList.js +2 -3
- package/lib/commonjs/mappings/FlatList.js.map +1 -0
- package/lib/commonjs/mappings/HeaderLarge.js +2 -3
- package/lib/commonjs/mappings/HeaderLarge.js.map +1 -0
- package/lib/commonjs/mappings/HeaderMedium.js +2 -3
- package/lib/commonjs/mappings/HeaderMedium.js.map +1 -0
- package/lib/commonjs/mappings/HeaderOverline.js +2 -3
- package/lib/commonjs/mappings/HeaderOverline.js.map +1 -0
- package/lib/commonjs/mappings/Icon.js +4 -4
- package/lib/commonjs/mappings/Icon.js.map +1 -0
- package/lib/commonjs/mappings/IconButton.js +2 -3
- package/lib/commonjs/mappings/IconButton.js.map +1 -0
- package/lib/commonjs/mappings/Image.js +2 -3
- package/lib/commonjs/mappings/Image.js.map +1 -0
- package/lib/commonjs/mappings/ImageBackground.js +2 -3
- package/lib/commonjs/mappings/ImageBackground.js.map +1 -0
- package/lib/commonjs/mappings/KeyboardAvoidingView.js +2 -3
- package/lib/commonjs/mappings/KeyboardAvoidingView.js.map +1 -0
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js +2 -3
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +1 -0
- package/lib/commonjs/mappings/Layout.js +2 -3
- package/lib/commonjs/mappings/Layout.js.map +1 -0
- package/lib/commonjs/mappings/LinearGradient.js +2 -3
- package/lib/commonjs/mappings/LinearGradient.js.map +1 -0
- package/lib/commonjs/mappings/MapCallout.js +2 -3
- package/lib/commonjs/mappings/MapCallout.js.map +1 -0
- package/lib/commonjs/mappings/MapMarker.js +2 -3
- package/lib/commonjs/mappings/MapMarker.js.map +1 -0
- package/lib/commonjs/mappings/MapView.js +2 -3
- package/lib/commonjs/mappings/MapView.js.map +1 -0
- package/lib/commonjs/mappings/Modal.js +2 -3
- package/lib/commonjs/mappings/Modal.js.map +1 -0
- package/lib/commonjs/mappings/NumberInput.js +6 -5
- package/lib/commonjs/mappings/NumberInput.js.map +1 -0
- package/lib/commonjs/mappings/Picker.js +6 -5
- package/lib/commonjs/mappings/Picker.js.map +1 -0
- package/lib/commonjs/mappings/ProgressBar.js +2 -3
- package/lib/commonjs/mappings/ProgressBar.js.map +1 -0
- package/lib/commonjs/mappings/ProgressCircle.js +2 -3
- package/lib/commonjs/mappings/ProgressCircle.js.map +1 -0
- package/lib/commonjs/mappings/ProgressIndicator.js +2 -3
- package/lib/commonjs/mappings/ProgressIndicator.js.map +1 -0
- package/lib/commonjs/mappings/RadioButton.js +2 -3
- package/lib/commonjs/mappings/RadioButton.js.map +1 -0
- package/lib/commonjs/mappings/RadioButtonGroup.js +2 -3
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -0
- package/lib/commonjs/mappings/RadioButtonRow.js +2 -3
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -0
- package/lib/commonjs/mappings/RowBodyIcon.js +2 -3
- package/lib/commonjs/mappings/RowBodyIcon.js.map +1 -0
- package/lib/commonjs/mappings/RowHeadlineImageCaption.js +2 -3
- package/lib/commonjs/mappings/RowHeadlineImageCaption.js.map +1 -0
- package/lib/commonjs/mappings/RowHeadlineImageIcon.js +14 -9
- package/lib/commonjs/mappings/RowHeadlineImageIcon.js.map +1 -0
- package/lib/commonjs/mappings/SVG.js +2 -3
- package/lib/commonjs/mappings/SVG.js.map +1 -0
- package/lib/commonjs/mappings/SafeAreaView.js +2 -3
- package/lib/commonjs/mappings/SafeAreaView.js.map +1 -0
- package/lib/commonjs/mappings/ScrollView.js +2 -3
- package/lib/commonjs/mappings/ScrollView.js.map +1 -0
- package/lib/commonjs/mappings/Slider.js +2 -3
- package/lib/commonjs/mappings/Slider.js.map +1 -0
- package/lib/commonjs/mappings/StarRating.js +3 -4
- package/lib/commonjs/mappings/StarRating.js.map +1 -0
- package/lib/commonjs/mappings/Stepper.js +2 -3
- package/lib/commonjs/mappings/Stepper.js.map +1 -0
- package/lib/commonjs/mappings/Surface.js +2 -3
- package/lib/commonjs/mappings/Surface.js.map +1 -0
- package/lib/commonjs/mappings/Swiper.js +2 -3
- package/lib/commonjs/mappings/Swiper.js.map +1 -0
- package/lib/commonjs/mappings/SwiperItem.js +2 -3
- package/lib/commonjs/mappings/SwiperItem.js.map +1 -0
- package/lib/commonjs/mappings/Switch.js +2 -3
- package/lib/commonjs/mappings/Switch.js.map +1 -0
- package/lib/commonjs/mappings/Text.js +7 -6
- package/lib/commonjs/mappings/Text.js.map +1 -0
- package/lib/commonjs/mappings/TextArea.js +4 -4
- package/lib/commonjs/mappings/TextArea.js.map +1 -0
- package/lib/commonjs/mappings/TextField.js +10 -10
- package/lib/commonjs/mappings/TextField.js.map +1 -0
- package/lib/commonjs/mappings/TextInput.js +5 -5
- package/lib/commonjs/mappings/TextInput.js.map +1 -0
- package/lib/commonjs/mappings/ToggleButton.js +2 -3
- package/lib/commonjs/mappings/ToggleButton.js.map +1 -0
- package/lib/commonjs/mappings/Touchable.js +2 -3
- package/lib/commonjs/mappings/Touchable.js.map +1 -0
- package/lib/commonjs/mappings/Video.js +2 -3
- package/lib/commonjs/mappings/Video.js.map +1 -0
- package/lib/commonjs/mappings/View.js +2 -3
- package/lib/commonjs/mappings/View.js.map +1 -0
- package/lib/commonjs/mappings/WebView.js +2 -3
- package/lib/commonjs/mappings/WebView.js.map +1 -0
- package/lib/commonjs/styles/DarkTheme.js +7 -7
- package/lib/commonjs/styles/DarkTheme.js.map +1 -0
- package/lib/commonjs/styles/DefaultTheme.js +28 -18
- package/lib/commonjs/styles/DefaultTheme.js.map +1 -0
- package/lib/commonjs/styles/fonts.js +5 -6
- package/lib/commonjs/styles/fonts.js.map +1 -0
- package/lib/commonjs/styles/overlay.js +7 -15
- package/lib/commonjs/styles/overlay.js.map +1 -0
- package/lib/commonjs/styles/shadow.js +2 -10
- package/lib/commonjs/styles/shadow.js.map +1 -0
- package/lib/commonjs/theming.js +2 -5
- package/lib/commonjs/theming.js.map +1 -0
- package/lib/commonjs/utilities.js +4 -15
- package/lib/commonjs/utilities.js.map +1 -0
- package/lib/module/Provider.js +2 -2
- package/lib/module/Provider.js.map +1 -0
- package/lib/module/components/Accordion/AccordionGroup.js +2 -5
- package/lib/module/components/Accordion/AccordionGroup.js.map +1 -0
- package/lib/module/components/Accordion/AccordionItem.js +2 -4
- package/lib/module/components/Accordion/AccordionItem.js.map +1 -0
- package/lib/module/components/Accordion/index.js +2 -1
- package/lib/module/components/Accordion/index.js.map +1 -0
- package/lib/module/components/ActionSheet/ActionSheet.js +2 -3
- package/lib/module/components/ActionSheet/ActionSheet.js.map +1 -0
- package/lib/module/components/ActionSheet/ActionSheetCancel.js +2 -3
- package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -0
- package/lib/module/components/ActionSheet/ActionSheetItem.js +2 -3
- package/lib/module/components/ActionSheet/ActionSheetItem.js.map +1 -0
- package/lib/module/components/ActionSheet/index.js +2 -1
- package/lib/module/components/ActionSheet/index.js.map +1 -0
- package/lib/module/components/AnimatedCircularProgress.js +2 -7
- package/lib/module/components/AnimatedCircularProgress.js.map +1 -0
- package/lib/module/components/AspectRatio.js +2 -7
- package/lib/module/components/AspectRatio.js.map +1 -0
- package/lib/module/components/AvatarEdit.js +2 -4
- package/lib/module/components/AvatarEdit.js.map +1 -0
- package/lib/module/components/Banner.js +11 -11
- package/lib/module/components/Banner.js.map +1 -0
- package/lib/module/components/Button.js +4 -11
- package/lib/module/components/Button.js.map +1 -0
- package/lib/module/components/Card.js +2 -3
- package/lib/module/components/Card.js.map +1 -0
- package/lib/module/components/CardBlock.js +2 -7
- package/lib/module/components/CardBlock.js.map +1 -0
- package/lib/module/components/CardContainer.js +2 -8
- package/lib/module/components/CardContainer.js.map +1 -0
- package/lib/module/components/CardContainerRating.js +4 -9
- package/lib/module/components/CardContainerRating.js.map +1 -0
- package/lib/module/components/CardContainerShortImage.js +2 -4
- package/lib/module/components/CardContainerShortImage.js.map +1 -0
- package/lib/module/components/CardInline.js +2 -3
- package/lib/module/components/CardInline.js.map +1 -0
- package/lib/module/components/Carousel.js +5 -10
- package/lib/module/components/Carousel.js.map +1 -0
- package/lib/module/components/Checkbox/Checkbox.js +5 -10
- package/lib/module/components/Checkbox/Checkbox.js.map +1 -0
- package/lib/module/components/Checkbox/CheckboxGroup.js +2 -6
- package/lib/module/components/Checkbox/CheckboxGroup.js.map +1 -0
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +2 -9
- package/lib/module/components/Checkbox/CheckboxGroupRow.js.map +1 -0
- package/lib/module/components/Checkbox/CheckboxRow.js +5 -12
- package/lib/module/components/Checkbox/CheckboxRow.js.map +1 -0
- package/lib/module/components/Checkbox/context.js +2 -3
- package/lib/module/components/Checkbox/context.js.map +1 -0
- package/lib/module/components/Checkbox/index.js +2 -1
- package/lib/module/components/Checkbox/index.js.map +1 -0
- package/lib/module/components/CircleImage.js +2 -4
- package/lib/module/components/CircleImage.js.map +1 -0
- package/lib/module/components/CircularProgress.js +5 -10
- package/lib/module/components/CircularProgress.js.map +1 -0
- package/lib/module/components/Config.js +7 -12
- package/lib/module/components/Config.js.map +1 -0
- package/lib/module/components/Container.js +2 -4
- package/lib/module/components/Container.js.map +1 -0
- package/lib/module/components/DatePicker/DatePicker.js +18 -34
- package/lib/module/components/DatePicker/DatePicker.js.map +1 -0
- package/lib/module/components/DatePicker/DatePickerComponent.js +2 -3
- package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -0
- package/lib/module/components/DatePicker/DatePickerComponent.web.js +2 -3
- package/lib/module/components/DatePicker/DatePickerComponent.web.js.map +1 -0
- package/lib/module/components/DatePicker/DatePickerComponentType.js +2 -1
- package/lib/module/components/DatePicker/DatePickerComponentType.js.map +1 -0
- package/lib/module/components/DeprecatedButton.js +2 -10
- package/lib/module/components/DeprecatedButton.js.map +1 -0
- package/lib/module/components/DeprecatedCardWrapper.js +2 -7
- package/lib/module/components/DeprecatedCardWrapper.js.map +1 -0
- package/lib/module/components/DeprecatedFAB.js +2 -14
- package/lib/module/components/DeprecatedFAB.js.map +1 -0
- package/lib/module/components/Divider.js +2 -4
- package/lib/module/components/Divider.js.map +1 -0
- package/lib/module/components/Elevation.js +2 -4
- package/lib/module/components/Elevation.js.map +1 -0
- package/lib/module/components/FAB.js +2 -4
- package/lib/module/components/FAB.js.map +1 -0
- package/lib/module/components/FieldSearchBarFull.js +2 -10
- package/lib/module/components/FieldSearchBarFull.js.map +1 -0
- package/lib/module/components/FormRow.js +2 -2
- package/lib/module/components/FormRow.js.map +1 -0
- package/lib/module/components/Header.js +2 -3
- package/lib/module/components/Header.js.map +1 -0
- package/lib/module/components/HeaderLarge.js +2 -3
- package/lib/module/components/HeaderLarge.js.map +1 -0
- package/lib/module/components/HeaderMedium.js +2 -3
- package/lib/module/components/HeaderMedium.js.map +1 -0
- package/lib/module/components/HeaderOverline.js +2 -3
- package/lib/module/components/HeaderOverline.js.map +1 -0
- package/lib/module/components/IconButton.js +2 -4
- package/lib/module/components/IconButton.js.map +1 -0
- package/lib/module/components/Image.js +2 -11
- package/lib/module/components/Image.js.map +1 -0
- package/lib/module/components/Justification.js +2 -1
- package/lib/module/components/Justification.js.map +1 -0
- package/lib/module/components/Layout.js +6 -4
- package/lib/module/components/Layout.js.map +1 -0
- package/lib/module/components/NumberInput.js +10 -17
- package/lib/module/components/NumberInput.js.map +1 -0
- package/lib/module/components/Picker/Picker.js +8 -24
- package/lib/module/components/Picker/Picker.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.android.js +8 -11
- package/lib/module/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.ios.js +10 -12
- package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.web.js +8 -11
- package/lib/module/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/module/components/Picker/PickerTypes.js +2 -1
- package/lib/module/components/Picker/PickerTypes.js.map +1 -0
- package/lib/module/components/Portal/Portal.js +6 -7
- package/lib/module/components/Portal/Portal.js.map +1 -0
- package/lib/module/components/Portal/PortalConsumer.js +7 -11
- package/lib/module/components/Portal/PortalConsumer.js.map +1 -0
- package/lib/module/components/Portal/PortalHost.js +6 -23
- package/lib/module/components/Portal/PortalHost.js.map +1 -0
- package/lib/module/components/Portal/PortalManager.js +9 -15
- package/lib/module/components/Portal/PortalManager.js.map +1 -0
- package/lib/module/components/ProgressBar.js +7 -18
- package/lib/module/components/ProgressBar.js.map +1 -0
- package/lib/module/components/ProgressCircle.js +2 -3
- package/lib/module/components/ProgressCircle.js.map +1 -0
- package/lib/module/components/ProgressIndicator.js +2 -3
- package/lib/module/components/ProgressIndicator.js.map +1 -0
- package/lib/module/components/RadioButton/RadioButton.js +3 -7
- package/lib/module/components/RadioButton/RadioButton.js.map +1 -0
- package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +2 -4
- package/lib/module/components/RadioButton/RadioButtonFieldGroup.js.map +1 -0
- package/lib/module/components/RadioButton/RadioButtonGroup.js +2 -8
- package/lib/module/components/RadioButton/RadioButtonGroup.js.map +1 -0
- package/lib/module/components/RadioButton/RadioButtonRow.js +3 -10
- package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -0
- package/lib/module/components/RadioButton/context.js +2 -3
- package/lib/module/components/RadioButton/context.js.map +1 -0
- package/lib/module/components/RadioButton/index.js +2 -1
- package/lib/module/components/RadioButton/index.js.map +1 -0
- package/lib/module/components/ResizeMode.js +2 -1
- package/lib/module/components/ResizeMode.js.map +1 -0
- package/lib/module/components/Row.js +2 -3
- package/lib/module/components/Row.js.map +1 -0
- package/lib/module/components/RowBodyIcon.js +2 -3
- package/lib/module/components/RowBodyIcon.js.map +1 -0
- package/lib/module/components/RowHeadlineImageCaption.js +4 -4
- package/lib/module/components/RowHeadlineImageCaption.js.map +1 -0
- package/lib/module/components/RowHeadlineImageIcon.js +2 -3
- package/lib/module/components/RowHeadlineImageIcon.js.map +1 -0
- package/lib/module/components/SVG.js +2 -3
- package/lib/module/components/SVG.js.map +1 -0
- package/lib/module/components/ScreenContainer.js +2 -7
- package/lib/module/components/ScreenContainer.js.map +1 -0
- package/lib/module/components/Slider.js +2 -11
- package/lib/module/components/Slider.js.map +1 -0
- package/lib/module/components/StarRating.js +2 -4
- package/lib/module/components/StarRating.js.map +1 -0
- package/lib/module/components/StepIndicator.js +7 -30
- package/lib/module/components/StepIndicator.js.map +1 -0
- package/lib/module/components/Stepper.js +6 -10
- package/lib/module/components/Stepper.js.map +1 -0
- package/lib/module/components/Surface.js +2 -6
- package/lib/module/components/Surface.js.map +1 -0
- package/lib/module/components/Swiper/Swiper.js +2 -5
- package/lib/module/components/Swiper/Swiper.js.map +1 -0
- package/lib/module/components/Swiper/SwiperItem.js +2 -3
- package/lib/module/components/Swiper/SwiperItem.js.map +1 -0
- package/lib/module/components/Swiper/index.js +2 -1
- package/lib/module/components/Swiper/index.js.map +1 -0
- package/lib/module/components/Switch.js +7 -8
- package/lib/module/components/Switch.js.map +1 -0
- package/lib/module/components/Text.js +10 -12
- package/lib/module/components/Text.js.map +1 -0
- package/lib/module/components/TextField.js +18 -51
- package/lib/module/components/TextField.js.map +1 -0
- package/lib/module/components/ToggleButton.js +4 -22
- package/lib/module/components/ToggleButton.js.map +1 -0
- package/lib/module/components/Touchable.js +2 -2
- package/lib/module/components/Touchable.js.map +1 -0
- package/lib/module/components/Touchable.web.js +2 -1
- package/lib/module/components/Touchable.web.js.map +1 -0
- package/lib/module/components/Typography.js +2 -1
- package/lib/module/components/Typography.js.map +1 -0
- package/lib/module/components/useAuthState.js +2 -5
- package/lib/module/components/useAuthState.js.map +1 -0
- package/lib/module/constants.js +4 -2
- package/lib/module/constants.js.map +1 -0
- package/lib/module/hooks.js +6 -3
- package/lib/module/hooks.js.map +1 -0
- package/lib/module/index.js +5 -3
- package/lib/module/index.js.map +1 -0
- package/lib/module/interfaces/Icon.js +4 -2
- package/lib/module/interfaces/Icon.js.map +1 -0
- package/lib/module/mappings/Accordion.js +2 -1
- package/lib/module/mappings/Accordion.js.map +1 -0
- package/lib/module/mappings/AccordionItem.js +2 -1
- package/lib/module/mappings/AccordionItem.js.map +1 -0
- package/lib/module/mappings/ActionSheet.js +2 -1
- package/lib/module/mappings/ActionSheet.js.map +1 -0
- package/lib/module/mappings/ActionSheetCancel.js +2 -1
- package/lib/module/mappings/ActionSheetCancel.js.map +1 -0
- package/lib/module/mappings/ActionSheetItem.js +2 -1
- package/lib/module/mappings/ActionSheetItem.js.map +1 -0
- package/lib/module/mappings/ActivityIndicator.js +2 -1
- package/lib/module/mappings/ActivityIndicator.js.map +1 -0
- package/lib/module/mappings/AudioPlayer.js +2 -1
- package/lib/module/mappings/AudioPlayer.js.map +1 -0
- package/lib/module/mappings/AvatarEdit.js +2 -1
- package/lib/module/mappings/AvatarEdit.js.map +1 -0
- package/lib/module/mappings/Banner.js +2 -1
- package/lib/module/mappings/Banner.js.map +1 -0
- package/lib/module/mappings/BlurView.js +2 -1
- package/lib/module/mappings/BlurView.js.map +1 -0
- package/lib/module/mappings/Button.js +8 -4
- package/lib/module/mappings/Button.js.map +1 -0
- package/lib/module/mappings/Card.js +5 -3
- package/lib/module/mappings/Card.js.map +1 -0
- package/lib/module/mappings/CardBlock.js +8 -4
- package/lib/module/mappings/CardBlock.js.map +1 -0
- package/lib/module/mappings/CardContainer.js +7 -6
- package/lib/module/mappings/CardContainer.js.map +1 -0
- package/lib/module/mappings/CardContainerRating.js +6 -3
- package/lib/module/mappings/CardContainerRating.js.map +1 -0
- package/lib/module/mappings/CardContainerShortImage.js +2 -1
- package/lib/module/mappings/CardContainerShortImage.js.map +1 -0
- package/lib/module/mappings/CardInline.js +2 -1
- package/lib/module/mappings/CardInline.js.map +1 -0
- package/lib/module/mappings/Carousel.js +2 -1
- package/lib/module/mappings/Carousel.js.map +1 -0
- package/lib/module/mappings/Checkbox.js +2 -1
- package/lib/module/mappings/Checkbox.js.map +1 -0
- package/lib/module/mappings/CheckboxGroup.js +2 -1
- package/lib/module/mappings/CheckboxGroup.js.map +1 -0
- package/lib/module/mappings/CheckboxRow.js +2 -1
- package/lib/module/mappings/CheckboxRow.js.map +1 -0
- package/lib/module/mappings/CircleImage.js +2 -1
- package/lib/module/mappings/CircleImage.js.map +1 -0
- package/lib/module/mappings/Container.js +2 -1
- package/lib/module/mappings/Container.js.map +1 -0
- package/lib/module/mappings/CustomCode.js +2 -1
- package/lib/module/mappings/CustomCode.js.map +1 -0
- package/lib/module/mappings/DatePicker.js +6 -3
- package/lib/module/mappings/DatePicker.js.map +1 -0
- package/lib/module/mappings/Divider.js +2 -1
- package/lib/module/mappings/Divider.js.map +1 -0
- package/lib/module/mappings/FAB.js +2 -1
- package/lib/module/mappings/FAB.js.map +1 -0
- package/lib/module/mappings/Fetch.js +2 -2
- package/lib/module/mappings/Fetch.js.map +1 -0
- package/lib/module/mappings/FieldSearchBarFull.js +4 -2
- package/lib/module/mappings/FieldSearchBarFull.js.map +1 -0
- package/lib/module/mappings/FlashList.js +2 -1
- package/lib/module/mappings/FlashList.js.map +1 -0
- package/lib/module/mappings/FlatList.js +2 -1
- package/lib/module/mappings/FlatList.js.map +1 -0
- package/lib/module/mappings/HeaderLarge.js +2 -1
- package/lib/module/mappings/HeaderLarge.js.map +1 -0
- package/lib/module/mappings/HeaderMedium.js +2 -1
- package/lib/module/mappings/HeaderMedium.js.map +1 -0
- package/lib/module/mappings/HeaderOverline.js +2 -1
- package/lib/module/mappings/HeaderOverline.js.map +1 -0
- package/lib/module/mappings/Icon.js +4 -2
- package/lib/module/mappings/Icon.js.map +1 -0
- package/lib/module/mappings/IconButton.js +2 -1
- package/lib/module/mappings/IconButton.js.map +1 -0
- package/lib/module/mappings/Image.js +2 -1
- package/lib/module/mappings/Image.js.map +1 -0
- package/lib/module/mappings/ImageBackground.js +2 -1
- package/lib/module/mappings/ImageBackground.js.map +1 -0
- package/lib/module/mappings/KeyboardAvoidingView.js +2 -1
- package/lib/module/mappings/KeyboardAvoidingView.js.map +1 -0
- package/lib/module/mappings/KeyboardAwareScrollView.js +2 -1
- package/lib/module/mappings/KeyboardAwareScrollView.js.map +1 -0
- package/lib/module/mappings/Layout.js +2 -1
- package/lib/module/mappings/Layout.js.map +1 -0
- package/lib/module/mappings/LinearGradient.js +2 -1
- package/lib/module/mappings/LinearGradient.js.map +1 -0
- package/lib/module/mappings/MapCallout.js +2 -1
- package/lib/module/mappings/MapCallout.js.map +1 -0
- package/lib/module/mappings/MapMarker.js +2 -1
- package/lib/module/mappings/MapMarker.js.map +1 -0
- package/lib/module/mappings/MapView.js +2 -1
- package/lib/module/mappings/MapView.js.map +1 -0
- package/lib/module/mappings/Modal.js +2 -1
- package/lib/module/mappings/Modal.js.map +1 -0
- package/lib/module/mappings/NumberInput.js +6 -3
- package/lib/module/mappings/NumberInput.js.map +1 -0
- package/lib/module/mappings/Picker.js +6 -3
- package/lib/module/mappings/Picker.js.map +1 -0
- package/lib/module/mappings/ProgressBar.js +2 -1
- package/lib/module/mappings/ProgressBar.js.map +1 -0
- package/lib/module/mappings/ProgressCircle.js +2 -1
- package/lib/module/mappings/ProgressCircle.js.map +1 -0
- package/lib/module/mappings/ProgressIndicator.js +2 -1
- package/lib/module/mappings/ProgressIndicator.js.map +1 -0
- package/lib/module/mappings/RadioButton.js +2 -1
- package/lib/module/mappings/RadioButton.js.map +1 -0
- package/lib/module/mappings/RadioButtonGroup.js +2 -1
- package/lib/module/mappings/RadioButtonGroup.js.map +1 -0
- package/lib/module/mappings/RadioButtonRow.js +2 -1
- package/lib/module/mappings/RadioButtonRow.js.map +1 -0
- package/lib/module/mappings/RowBodyIcon.js +2 -1
- package/lib/module/mappings/RowBodyIcon.js.map +1 -0
- package/lib/module/mappings/RowHeadlineImageCaption.js +2 -1
- package/lib/module/mappings/RowHeadlineImageCaption.js.map +1 -0
- package/lib/module/mappings/RowHeadlineImageIcon.js +14 -7
- package/lib/module/mappings/RowHeadlineImageIcon.js.map +1 -0
- package/lib/module/mappings/SVG.js +2 -1
- package/lib/module/mappings/SVG.js.map +1 -0
- package/lib/module/mappings/SafeAreaView.js +2 -1
- package/lib/module/mappings/SafeAreaView.js.map +1 -0
- package/lib/module/mappings/ScrollView.js +2 -1
- package/lib/module/mappings/ScrollView.js.map +1 -0
- package/lib/module/mappings/Slider.js +2 -1
- package/lib/module/mappings/Slider.js.map +1 -0
- package/lib/module/mappings/StarRating.js +3 -2
- package/lib/module/mappings/StarRating.js.map +1 -0
- package/lib/module/mappings/Stepper.js +2 -1
- package/lib/module/mappings/Stepper.js.map +1 -0
- package/lib/module/mappings/Surface.js +2 -1
- package/lib/module/mappings/Surface.js.map +1 -0
- package/lib/module/mappings/Swiper.js +2 -1
- package/lib/module/mappings/Swiper.js.map +1 -0
- package/lib/module/mappings/SwiperItem.js +2 -1
- package/lib/module/mappings/SwiperItem.js.map +1 -0
- package/lib/module/mappings/Switch.js +2 -1
- package/lib/module/mappings/Switch.js.map +1 -0
- package/lib/module/mappings/Text.js +7 -4
- package/lib/module/mappings/Text.js.map +1 -0
- package/lib/module/mappings/TextArea.js +4 -2
- package/lib/module/mappings/TextArea.js.map +1 -0
- package/lib/module/mappings/TextField.js +10 -8
- package/lib/module/mappings/TextField.js.map +1 -0
- package/lib/module/mappings/TextInput.js +5 -3
- package/lib/module/mappings/TextInput.js.map +1 -0
- package/lib/module/mappings/ToggleButton.js +2 -1
- package/lib/module/mappings/ToggleButton.js.map +1 -0
- package/lib/module/mappings/Touchable.js +2 -1
- package/lib/module/mappings/Touchable.js.map +1 -0
- package/lib/module/mappings/Video.js +2 -1
- package/lib/module/mappings/Video.js.map +1 -0
- package/lib/module/mappings/View.js +2 -1
- package/lib/module/mappings/View.js.map +1 -0
- package/lib/module/mappings/WebView.js +2 -1
- package/lib/module/mappings/WebView.js.map +1 -0
- package/lib/module/styles/DarkTheme.js +6 -3
- package/lib/module/styles/DarkTheme.js.map +1 -0
- package/lib/module/styles/DefaultTheme.js +28 -14
- package/lib/module/styles/DefaultTheme.js.map +1 -0
- package/lib/module/styles/fonts.js +4 -2
- package/lib/module/styles/fonts.js.map +1 -0
- package/lib/module/styles/overlay.js +6 -11
- package/lib/module/styles/overlay.js.map +1 -0
- package/lib/module/styles/shadow.js +2 -7
- package/lib/module/styles/shadow.js.map +1 -0
- package/lib/module/theming.js +2 -1
- package/lib/module/theming.js.map +1 -0
- package/lib/module/utilities.js +4 -6
- package/lib/module/utilities.js.map +1 -0
- package/lib/typescript/src/components/Text.d.ts +2 -1
- package/lib/typescript/src/components/TextField.d.ts +2 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/mappings/TextField.d.ts +2 -2
- package/lib/typescript/src/mappings/TextInput.d.ts +1 -1
- package/package.json +4 -6
- package/src/components/Text.js +8 -2
- package/src/components/Text.tsx +6 -1
- package/src/components/TextField.js +6 -1
- package/src/components/TextField.tsx +7 -1
- package/src/index.js +0 -1
- package/src/index.tsx +0 -1
- package/src/mappings/TextField.js +1 -1
- package/src/mappings/TextField.ts +1 -1
- package/src/mappings/TextInput.js +1 -1
- package/src/mappings/TextInput.ts +1 -1
- package/lib/commonjs/components/TabView/TabView.js +0 -102
- package/lib/commonjs/components/TabView/TabViewItem.js +0 -26
- package/lib/commonjs/components/TabView/index.js +0 -23
- package/lib/commonjs/mappings/TabView.js +0 -79
- package/lib/module/components/TabView/TabView.js +0 -87
- package/lib/module/components/TabView/TabViewItem.js +0 -18
- package/lib/module/components/TabView/index.js +0 -2
- package/lib/module/mappings/TabView.js +0 -70
- package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
- package/lib/typescript/src/components/TabView/index.d.ts +0 -2
- package/lib/typescript/src/mappings/TabView.d.ts +0 -111
- package/src/components/TabView/TabView.js +0 -34
- package/src/components/TabView/TabView.tsx +0 -97
- package/src/components/TabView/TabViewItem.js +0 -5
- package/src/components/TabView/TabViewItem.tsx +0 -21
- package/src/components/TabView/index.js +0 -2
- package/src/components/TabView/index.tsx +0 -2
- package/src/mappings/TabView.js +0 -73
- package/src/mappings/TabView.ts +0 -80
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
export default class PortalConsumer extends React.Component {
|
|
5
6
|
constructor() {
|
|
6
7
|
super(...arguments);
|
|
7
|
-
|
|
8
8
|
_defineProperty(this, "key", void 0);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
10
|
async componentDidMount() {
|
|
12
|
-
this.checkManager();
|
|
11
|
+
this.checkManager();
|
|
13
12
|
|
|
13
|
+
// Delay updating to prevent React from going to infinite loop
|
|
14
14
|
await Promise.resolve();
|
|
15
15
|
this.key = this.props.manager.mount(this.props.children);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
17
|
componentDidUpdate() {
|
|
19
18
|
this.checkManager();
|
|
20
19
|
this.props.manager.update(this.key, this.props.children);
|
|
21
20
|
}
|
|
22
|
-
|
|
23
21
|
componentWillUnmount() {
|
|
24
22
|
this.checkManager();
|
|
25
23
|
this.props.manager.unmount(this.key);
|
|
26
24
|
}
|
|
27
|
-
|
|
28
25
|
checkManager() {
|
|
29
26
|
if (!this.props.manager) {
|
|
30
27
|
throw new Error("Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\n\n" + "Please read our getting-started guide and make sure you've followed all the required steps.\n\n" + "https://callstack.github.io/react-native-paper/getting-started.html");
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
|
-
|
|
34
30
|
render() {
|
|
35
31
|
return null;
|
|
36
32
|
}
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=PortalConsumer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","PortalConsumer","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,OAAO,KAAKA,KAAK,MAAM,OAAO;AAQ9B,eAAe,MAAMC,cAAc,SAASD,KAAK,CAACE,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"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { View, StyleSheet } from "react-native";
|
|
5
6
|
import PortalManager from "./PortalManager";
|
|
6
7
|
export const PortalContext = /*#__PURE__*/React.createContext(null);
|
|
8
|
+
|
|
7
9
|
/**
|
|
8
10
|
* Portal host renders all of its children `Portal` elements.
|
|
9
11
|
* For example, you can wrap a screen in `Portal.Host` to render items above the screen.
|
|
@@ -28,18 +30,14 @@ export const PortalContext = /*#__PURE__*/React.createContext(null);
|
|
|
28
30
|
*
|
|
29
31
|
* Here any `Portal` elements under `<App />` are rendered alongside `<App />` and will appear above `<App />` like a `Modal`.
|
|
30
32
|
*/
|
|
31
|
-
|
|
32
33
|
export default class PortalHost extends React.Component {
|
|
33
34
|
constructor() {
|
|
34
35
|
super(...arguments);
|
|
35
|
-
|
|
36
36
|
_defineProperty(this, "setManager", manager => {
|
|
37
37
|
this.manager = manager;
|
|
38
38
|
});
|
|
39
|
-
|
|
40
39
|
_defineProperty(this, "mount", children => {
|
|
41
40
|
const key = this.nextKey++;
|
|
42
|
-
|
|
43
41
|
if (this.manager) {
|
|
44
42
|
this.manager.mount(key, children);
|
|
45
43
|
} else {
|
|
@@ -49,10 +47,8 @@ export default class PortalHost extends React.Component {
|
|
|
49
47
|
children
|
|
50
48
|
});
|
|
51
49
|
}
|
|
52
|
-
|
|
53
50
|
return key;
|
|
54
51
|
});
|
|
55
|
-
|
|
56
52
|
_defineProperty(this, "update", (key, children) => {
|
|
57
53
|
if (this.manager) {
|
|
58
54
|
this.manager.update(key, children);
|
|
@@ -63,7 +59,6 @@ export default class PortalHost extends React.Component {
|
|
|
63
59
|
children
|
|
64
60
|
};
|
|
65
61
|
const index = this.queue.findIndex(o => o.type === "mount" || o.type === "update" && o.key === key);
|
|
66
|
-
|
|
67
62
|
if (index > -1) {
|
|
68
63
|
// @ts-ignore
|
|
69
64
|
this.queue[index] = op;
|
|
@@ -72,7 +67,6 @@ export default class PortalHost extends React.Component {
|
|
|
72
67
|
}
|
|
73
68
|
}
|
|
74
69
|
});
|
|
75
|
-
|
|
76
70
|
_defineProperty(this, "unmount", key => {
|
|
77
71
|
if (this.manager) {
|
|
78
72
|
this.manager.unmount(key);
|
|
@@ -83,31 +77,23 @@ export default class PortalHost extends React.Component {
|
|
|
83
77
|
});
|
|
84
78
|
}
|
|
85
79
|
});
|
|
86
|
-
|
|
87
80
|
_defineProperty(this, "nextKey", 0);
|
|
88
|
-
|
|
89
81
|
_defineProperty(this, "queue", []);
|
|
90
|
-
|
|
91
82
|
_defineProperty(this, "manager", void 0);
|
|
92
83
|
}
|
|
93
|
-
|
|
94
84
|
componentDidMount() {
|
|
95
85
|
const manager = this.manager;
|
|
96
86
|
const queue = this.queue;
|
|
97
|
-
|
|
98
87
|
while (queue.length && manager) {
|
|
99
88
|
const action = queue.pop();
|
|
100
|
-
|
|
101
89
|
if (action) {
|
|
102
90
|
switch (action.type) {
|
|
103
91
|
case "mount":
|
|
104
92
|
manager.mount(action.key, action.children);
|
|
105
93
|
break;
|
|
106
|
-
|
|
107
94
|
case "update":
|
|
108
95
|
manager.update(action.key, action.children);
|
|
109
96
|
break;
|
|
110
|
-
|
|
111
97
|
case "unmount":
|
|
112
98
|
manager.unmount(action.key);
|
|
113
99
|
break;
|
|
@@ -115,7 +101,6 @@ export default class PortalHost extends React.Component {
|
|
|
115
101
|
}
|
|
116
102
|
}
|
|
117
103
|
}
|
|
118
|
-
|
|
119
104
|
render() {
|
|
120
105
|
return /*#__PURE__*/React.createElement(PortalContext.Provider, {
|
|
121
106
|
value: {
|
|
@@ -131,13 +116,11 @@ export default class PortalHost extends React.Component {
|
|
|
131
116
|
ref: this.setManager
|
|
132
117
|
}));
|
|
133
118
|
}
|
|
134
|
-
|
|
135
119
|
}
|
|
136
|
-
|
|
137
120
|
_defineProperty(PortalHost, "displayName", "Portal.Host");
|
|
138
|
-
|
|
139
121
|
const styles = StyleSheet.create({
|
|
140
122
|
container: {
|
|
141
123
|
flex: 1
|
|
142
124
|
}
|
|
143
|
-
});
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=PortalHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","PortalManager","PortalContext","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","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":"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"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
|
|
1
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { View, StyleSheet } from "react-native";
|
|
5
|
-
|
|
6
6
|
/**
|
|
7
7
|
* Portal host is the component which actually renders all Portals.
|
|
8
8
|
*/
|
|
9
9
|
export default class PortalManager extends React.PureComponent {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
|
-
|
|
13
12
|
_defineProperty(this, "state", {
|
|
14
13
|
portals: []
|
|
15
14
|
});
|
|
16
|
-
|
|
17
15
|
_defineProperty(this, "mount", (key, children) => {
|
|
18
16
|
this.setState(state => ({
|
|
19
17
|
portals: [...state.portals, {
|
|
@@ -22,24 +20,21 @@ export default class PortalManager extends React.PureComponent {
|
|
|
22
20
|
}]
|
|
23
21
|
}));
|
|
24
22
|
});
|
|
25
|
-
|
|
26
23
|
_defineProperty(this, "update", (key, children) => this.setState(state => ({
|
|
27
24
|
portals: state.portals.map(item => {
|
|
28
25
|
if (item.key === key) {
|
|
29
|
-
return {
|
|
26
|
+
return {
|
|
27
|
+
...item,
|
|
30
28
|
children
|
|
31
29
|
};
|
|
32
30
|
}
|
|
33
|
-
|
|
34
31
|
return item;
|
|
35
32
|
})
|
|
36
33
|
})));
|
|
37
|
-
|
|
38
34
|
_defineProperty(this, "unmount", key => this.setState(state => ({
|
|
39
35
|
portals: state.portals.filter(item => item.key !== key)
|
|
40
36
|
})));
|
|
41
37
|
}
|
|
42
|
-
|
|
43
38
|
render() {
|
|
44
39
|
return this.state.portals.map(_ref => {
|
|
45
40
|
let {
|
|
@@ -48,13 +43,12 @@ export default class PortalManager extends React.PureComponent {
|
|
|
48
43
|
} = _ref;
|
|
49
44
|
return /*#__PURE__*/React.createElement(View, {
|
|
50
45
|
key: key,
|
|
51
|
-
collapsable: false
|
|
52
|
-
|
|
53
|
-
,
|
|
46
|
+
collapsable: false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */,
|
|
47
|
+
|
|
54
48
|
pointerEvents: "box-none",
|
|
55
49
|
style: StyleSheet.absoluteFill
|
|
56
50
|
}, children);
|
|
57
51
|
});
|
|
58
52
|
}
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=PortalManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","PortalManager","PureComponent","portals","key","children","setState","state","map","item","filter","render","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,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAS/C;AACA;AACA;AACA,eAAe,MAAMC,aAAa,SAASH,KAAK,CAACI,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,IAAI;QACH,GAAG,EAAED,GAAI;QACT,WAAW,EACT,KAAK,CAAC,wGACP;;QACD,aAAa,EAAC,UAAU;QACxB,KAAK,EAAEJ,UAAU,CAACY;MAAa,GAE9BP,QAAQ,CACJ;IAAA,CACR,CAAC;EACJ;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
function
|
|
4
|
-
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
5
|
import React, { Component } from "react";
|
|
6
6
|
import { Animated, Easing, View, I18nManager } from "react-native";
|
|
7
7
|
const INDETERMINATE_WIDTH_FACTOR = 0.3;
|
|
@@ -9,24 +9,20 @@ const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_
|
|
|
9
9
|
export default class ProgressBar extends Component {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
|
-
|
|
13
12
|
_defineProperty(this, "handleLayout", event => {
|
|
14
13
|
const {
|
|
15
14
|
width = 150,
|
|
16
15
|
onLayout
|
|
17
16
|
} = this.props;
|
|
18
|
-
|
|
19
17
|
if (!width) {
|
|
20
18
|
this.setState({
|
|
21
19
|
width: event.nativeEvent.layout.width
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
if (onLayout) {
|
|
26
23
|
onLayout(event);
|
|
27
24
|
}
|
|
28
25
|
});
|
|
29
|
-
|
|
30
26
|
const {
|
|
31
27
|
progress: progressP = 0,
|
|
32
28
|
indeterminate = false
|
|
@@ -38,17 +34,14 @@ export default class ProgressBar extends Component {
|
|
|
38
34
|
animationValue: new Animated.Value(BAR_WIDTH_ZERO_POSITION)
|
|
39
35
|
};
|
|
40
36
|
}
|
|
41
|
-
|
|
42
37
|
componentDidMount() {
|
|
43
38
|
const {
|
|
44
39
|
indeterminate = false
|
|
45
40
|
} = this.props;
|
|
46
|
-
|
|
47
41
|
if (indeterminate) {
|
|
48
42
|
this.animate();
|
|
49
43
|
}
|
|
50
44
|
}
|
|
51
|
-
|
|
52
45
|
componentDidUpdate(prevProps) {
|
|
53
46
|
const {
|
|
54
47
|
indeterminate = false,
|
|
@@ -60,7 +53,6 @@ export default class ProgressBar extends Component {
|
|
|
60
53
|
},
|
|
61
54
|
animated = true
|
|
62
55
|
} = this.props;
|
|
63
|
-
|
|
64
56
|
if (prevProps.indeterminate !== indeterminate) {
|
|
65
57
|
if (indeterminate) {
|
|
66
58
|
this.animate();
|
|
@@ -71,12 +63,11 @@ export default class ProgressBar extends Component {
|
|
|
71
63
|
}).start();
|
|
72
64
|
}
|
|
73
65
|
}
|
|
74
|
-
|
|
75
66
|
if (prevProps.indeterminate !== indeterminate || prevProps.progress !== progressP) {
|
|
76
67
|
const progress = this.props.indeterminate ? INDETERMINATE_WIDTH_FACTOR : Math.min(Math.max(progressP, 0), 1);
|
|
77
|
-
|
|
78
68
|
if (animated) {
|
|
79
|
-
Animated[animationType](this.state.progress, {
|
|
69
|
+
Animated[animationType](this.state.progress, {
|
|
70
|
+
...animationConfig,
|
|
80
71
|
toValue: progress,
|
|
81
72
|
velocity: 0,
|
|
82
73
|
//adjust this value if animation fails - velocity is required
|
|
@@ -87,7 +78,6 @@ export default class ProgressBar extends Component {
|
|
|
87
78
|
}
|
|
88
79
|
}
|
|
89
80
|
}
|
|
90
|
-
|
|
91
81
|
animate() {
|
|
92
82
|
const {
|
|
93
83
|
useNativeDriver = false,
|
|
@@ -106,7 +96,6 @@ export default class ProgressBar extends Component {
|
|
|
106
96
|
}
|
|
107
97
|
});
|
|
108
98
|
}
|
|
109
|
-
|
|
110
99
|
render() {
|
|
111
100
|
const {
|
|
112
101
|
borderColor,
|
|
@@ -157,5 +146,5 @@ export default class ProgressBar extends Component {
|
|
|
157
146
|
style: progressStyle
|
|
158
147
|
}), children);
|
|
159
148
|
}
|
|
160
|
-
|
|
161
|
-
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Component","Animated","Easing","View","I18nManager","INDETERMINATE_WIDTH_FACTOR","BAR_WIDTH_ZERO_POSITION","ProgressBar","constructor","props","event","width","onLayout","setState","nativeEvent","layout","progress","progressP","indeterminate","Math","min","max","state","Value","animationValue","componentDidMount","animate","componentDidUpdate","prevProps","useNativeDriver","animationType","animationConfig","bounciness","animated","spring","toValue","start","velocity","setValue","indeterminateAnimationDuration","timing","duration","easing","linear","isInteraction","endState","finished","render","borderColor","borderRadius","borderWidth","children","color","style","unfilledColor","restProps","innerWidth","containerStyle","overflow","backgroundColor","progressStyle","height","transform","translateX","interpolate","inputRange","outputRange","isRTL","scaleX","handleLayout"],"sources":["ProgressBar.tsx"],"sourcesContent":["import React, { Component } from \"react\";\nimport {\n Animated,\n Easing,\n View,\n I18nManager,\n ViewProps,\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n} from \"react-native\";\n\nconst INDETERMINATE_WIDTH_FACTOR = 0.3;\nconst BAR_WIDTH_ZERO_POSITION =\n INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_WIDTH_FACTOR);\n\ntype Props = {\n borderColor?: string;\n borderRadius?: number;\n borderWidth?: number;\n children?: React.ReactNode;\n color?: string;\n height?: number;\n style?: StyleProp<ViewStyle>;\n unfilledColor?: string;\n width?: number;\n animated?: boolean;\n indeterminate?: boolean;\n indeterminateAnimationDuration?: number;\n progress?: number;\n useNativeDriver?: boolean;\n animationConfig?: Animated.AnimationConfig;\n animationType?: \"decay\" | \"timing\" | \"spring\";\n} & ViewProps;\n\ninterface State {\n width: number;\n progress: Animated.Value;\n animationValue: Animated.Value;\n}\n\nexport default class ProgressBar extends Component<Props, State> {\n constructor(props: Props) {\n super(props);\n const { progress: progressP = 0, indeterminate = false } = props;\n const progress = Math.min(Math.max(progressP, 0), 1);\n this.state = {\n width: 0,\n progress: new Animated.Value(\n indeterminate ? INDETERMINATE_WIDTH_FACTOR : progress\n ),\n animationValue: new Animated.Value(BAR_WIDTH_ZERO_POSITION),\n };\n }\n\n componentDidMount() {\n const { indeterminate = false } = this.props;\n if (indeterminate) {\n this.animate();\n }\n }\n\n componentDidUpdate(prevProps: Props) {\n const {\n indeterminate = false,\n useNativeDriver = false,\n progress: progressP = 0,\n animationType = \"spring\",\n animationConfig = { bounciness: 0 },\n animated = true,\n } = this.props;\n\n if (prevProps.indeterminate !== indeterminate) {\n if (indeterminate) {\n this.animate();\n } else {\n Animated.spring(this.state.animationValue, {\n toValue: BAR_WIDTH_ZERO_POSITION,\n useNativeDriver,\n }).start();\n }\n }\n if (\n prevProps.indeterminate !== indeterminate ||\n prevProps.progress !== progressP\n ) {\n const progress = this.props.indeterminate\n ? INDETERMINATE_WIDTH_FACTOR\n : Math.min(Math.max(progressP, 0), 1);\n\n if (animated) {\n Animated[animationType](this.state.progress, {\n ...animationConfig,\n toValue: progress,\n velocity: 0, //adjust this value if animation fails - velocity is required\n useNativeDriver,\n }).start();\n } else {\n this.state.progress.setValue(progress);\n }\n }\n }\n\n handleLayout = (event: LayoutChangeEvent) => {\n const { width = 150, onLayout } = this.props;\n if (!width) {\n this.setState({ width: event.nativeEvent.layout.width });\n }\n if (onLayout) {\n onLayout(event);\n }\n };\n\n animate() {\n const { useNativeDriver = false, indeterminateAnimationDuration = 1000 } =\n this.props;\n this.state.animationValue.setValue(0);\n Animated.timing(this.state.animationValue, {\n toValue: 1,\n duration: indeterminateAnimationDuration,\n easing: Easing.linear,\n isInteraction: false,\n useNativeDriver,\n }).start((endState) => {\n if (endState.finished) {\n this.animate();\n }\n });\n }\n\n render() {\n const {\n borderColor,\n borderRadius = 4,\n borderWidth = 1,\n children,\n color = \"rgba(0, 122, 255, 1)\",\n style,\n unfilledColor,\n width = 150,\n ...restProps\n } = this.props;\n\n const innerWidth = Math.max(0, width || this.state.width) - borderWidth * 2;\n const containerStyle: StyleProp<ViewStyle> = {\n width,\n borderWidth,\n borderColor: borderColor || color,\n borderRadius,\n overflow: \"hidden\",\n backgroundColor: unfilledColor,\n };\n const progressStyle = {\n backgroundColor: color,\n // Always take up full height of container.\n height: \"100%\",\n transform: [\n {\n translateX: this.state.animationValue.interpolate({\n inputRange: [0, 1],\n outputRange: [innerWidth * -INDETERMINATE_WIDTH_FACTOR, innerWidth],\n }),\n },\n {\n translateX: this.state.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [innerWidth / (I18nManager.isRTL ? 2 : -2), 0],\n }),\n },\n {\n // Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278\n scaleX: this.state.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0.0001, 1],\n }),\n },\n ],\n };\n\n return (\n <View\n style={[containerStyle, style]}\n onLayout={this.handleLayout}\n {...restProps}\n >\n <Animated.View style={progressStyle} />\n {children}\n </View>\n );\n }\n}\n"],"mappings":"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"}
|
|
@@ -2,7 +2,6 @@ import * as React from "react";
|
|
|
2
2
|
import { Text } from "react-native";
|
|
3
3
|
import AnimatedCircularProgress from "./AnimatedCircularProgress";
|
|
4
4
|
import { withTheme } from "../theming";
|
|
5
|
-
|
|
6
5
|
const ProgressCircle = _ref => {
|
|
7
6
|
let {
|
|
8
7
|
progress = 0.5,
|
|
@@ -36,5 +35,5 @@ const ProgressCircle = _ref => {
|
|
|
36
35
|
}, textStyle]
|
|
37
36
|
}, Math.round(fill), "%") : null);
|
|
38
37
|
};
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
export default withTheme(ProgressCircle);
|
|
39
|
+
//# sourceMappingURL=ProgressCircle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","AnimatedCircularProgress","withTheme","ProgressCircle","progress","style","color","size","showsText","unfilledColor","strokeCap","textStyle","thickness","theme","progressNum","Math","round","tintColor","colors","primary","backgroundColor","secondary","fill","fontSize"],"sources":["ProgressCircle.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Text, StyleProp, ViewStyle, TextStyle } from \"react-native\";\nimport AnimatedCircularProgress from \"./AnimatedCircularProgress\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n progress?: number;\n style?: StyleProp<ViewStyle>;\n color?: colorTypes;\n size?: number;\n showsText?: boolean;\n unfilledColor?: colorTypes;\n strokeCap?: \"butt\" | \"square\" | \"round\" | undefined;\n textStyle?: StyleProp<TextStyle>;\n thickness?: number;\n theme: typeof themeT;\n};\n\nconst ProgressCircle: React.FC<React.PropsWithChildren<Props>> = ({\n progress = 0.5,\n style,\n color = \"primary\",\n size = 100,\n showsText = true,\n unfilledColor,\n strokeCap = \"butt\",\n textStyle,\n thickness = 1,\n theme,\n}) => {\n const progressNum = Math.round(progress * 100);\n\n const tintColor = color || theme.colors.primary;\n const backgroundColor = unfilledColor || theme.colors.secondary;\n\n return (\n <AnimatedCircularProgress\n size={size}\n width={thickness}\n backgroundWidth={thickness}\n fill={progressNum}\n tintColor={tintColor}\n backgroundColor={backgroundColor}\n rotation={0}\n lineCap={strokeCap}\n style={style}\n >\n {/* @ts-ignore */}\n {(fill) =>\n showsText ? (\n <Text\n style={[{ fontSize: size * 0.275, color: tintColor }, textStyle]}\n >\n {Math.round(fill)}%\n </Text>\n ) : null\n }\n </AnimatedCircularProgress>\n );\n};\n\nexport default withTheme(ProgressCircle);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAyC,cAAc;AACpE,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,SAASC,SAAS,QAAQ,YAAY;AAiBtC,MAAMC,cAAwD,GAAG,QAW3D;EAAA,IAX4D;IAChEC,QAAQ,GAAG,GAAG;IACdC,KAAK;IACLC,KAAK,GAAG,SAAS;IACjBC,IAAI,GAAG,GAAG;IACVC,SAAS,GAAG,IAAI;IAChBC,aAAa;IACbC,SAAS,GAAG,MAAM;IAClBC,SAAS;IACTC,SAAS,GAAG,CAAC;IACbC;EACF,CAAC;EACC,MAAMC,WAAW,GAAGC,IAAI,CAACC,KAAK,CAACZ,QAAQ,GAAG,GAAG,CAAC;EAE9C,MAAMa,SAAS,GAAGX,KAAK,IAAIO,KAAK,CAACK,MAAM,CAACC,OAAO;EAC/C,MAAMC,eAAe,GAAGX,aAAa,IAAII,KAAK,CAACK,MAAM,CAACG,SAAS;EAE/D,oBACE,oBAAC,wBAAwB;IACvB,IAAI,EAAEd,IAAK;IACX,KAAK,EAAEK,SAAU;IACjB,eAAe,EAAEA,SAAU;IAC3B,IAAI,EAAEE,WAAY;IAClB,SAAS,EAAEG,SAAU;IACrB,eAAe,EAAEG,eAAgB;IACjC,QAAQ,EAAE,CAAE;IACZ,OAAO,EAAEV,SAAU;IACnB,KAAK,EAAEL;EAAM,GAGXiB,IAAI,IACJd,SAAS,gBACP,oBAAC,IAAI;IACH,KAAK,EAAE,CAAC;MAAEe,QAAQ,EAAEhB,IAAI,GAAG,KAAK;MAAED,KAAK,EAAEW;IAAU,CAAC,EAAEN,SAAS;EAAE,GAEhEI,IAAI,CAACC,KAAK,CAACM,IAAI,CAAC,MACZ,GACL,IAAI,CAEe;AAE/B,CAAC;AAED,eAAepB,SAAS,CAACC,cAAc,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import StepIndicator from "./StepIndicator";
|
|
3
3
|
import { withTheme } from "../theming";
|
|
4
|
-
|
|
5
4
|
const ProgressIndicator = _ref => {
|
|
6
5
|
let {
|
|
7
6
|
numberOfSteps,
|
|
@@ -43,5 +42,5 @@ const ProgressIndicator = _ref => {
|
|
|
43
42
|
}
|
|
44
43
|
});
|
|
45
44
|
};
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
export default withTheme(ProgressIndicator);
|
|
46
|
+
//# sourceMappingURL=ProgressIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StepIndicator","withTheme","ProgressIndicator","numberOfSteps","currentStep","currentStepStrokeWidth","stepStrokeCurrentColor","stepIndicatorSize","currentStepIndicatorSize","stepIndicatorCurrentColor","stepIndicatorLabelCurrentColor","stepIndicatorLabelFontSize","stepNumberFinishedColor","stepNumberUnfinishedColor","unfinishedColor","finishedColor","theme","currentPosition","stepStrokeFinishedColor","stepStrokeUnFinishedColor","separatorFinishedColor","separatorUnFinishedColor","stepIndicatorFinishedColor","stepIndicatorUnFinishedColor","stepIndicatorLabelUnFinishedColor","stepIndicatorLabelFinishedColor","labelFontFamily","typography","body1","fontFamily"],"sources":["ProgressIndicator.tsx"],"sourcesContent":["import * as React from \"react\";\nimport StepIndicator from \"./StepIndicator\";\nimport { withTheme } from \"../theming\";\nimport themeT from \"../styles/DefaultTheme\";\nimport { colorTypes } from \"@draftbit/types\";\n\ntype Props = {\n numberOfSteps: number;\n currentStep: number;\n currentStepStrokeWidth?: number;\n stepStrokeCurrentColor?: colorTypes;\n stepIndicatorSize?: number;\n currentStepIndicatorSize?: number;\n stepIndicatorCurrentColor?: colorTypes;\n stepIndicatorLabelCurrentColor?: colorTypes;\n stepIndicatorLabelFontSize?: number;\n stepNumberFinishedColor?: colorTypes;\n stepNumberUnfinishedColor?: colorTypes;\n unfinishedColor?: colorTypes;\n finishedColor?: colorTypes;\n theme: typeof themeT;\n};\n\nconst ProgressIndicator: React.FC<React.PropsWithChildren<Props>> = ({\n numberOfSteps,\n currentStep,\n currentStepStrokeWidth = 3,\n stepStrokeCurrentColor = \"primary\",\n stepIndicatorSize,\n currentStepIndicatorSize,\n stepIndicatorCurrentColor,\n stepIndicatorLabelCurrentColor,\n stepIndicatorLabelFontSize = 12,\n stepNumberFinishedColor = \"strongInverse\",\n stepNumberUnfinishedColor = \"primary\",\n unfinishedColor = \"light\",\n finishedColor = \"primary\",\n theme,\n}) => {\n const currentPosition = currentStep - 1;\n return (\n <StepIndicator\n stepCount={numberOfSteps}\n currentPosition={currentPosition}\n customStyles={{\n stepIndicatorSize,\n currentStepIndicatorSize: currentStepIndicatorSize\n ? currentStepIndicatorSize\n : stepIndicatorSize,\n stepStrokeFinishedColor: finishedColor,\n stepStrokeUnFinishedColor: unfinishedColor,\n separatorFinishedColor: finishedColor,\n separatorUnFinishedColor: unfinishedColor,\n stepIndicatorFinishedColor: finishedColor,\n stepIndicatorUnFinishedColor: unfinishedColor,\n currentStepStrokeWidth,\n stepStrokeCurrentColor:\n stepStrokeCurrentColor || stepIndicatorCurrentColor,\n stepIndicatorLabelUnFinishedColor: stepNumberUnfinishedColor,\n stepIndicatorLabelFinishedColor: stepNumberFinishedColor,\n stepIndicatorCurrentColor: stepIndicatorCurrentColor || unfinishedColor,\n stepIndicatorLabelCurrentColor:\n stepIndicatorLabelCurrentColor || stepNumberUnfinishedColor,\n stepIndicatorLabelFontSize,\n labelFontFamily: theme.typography.body1.fontFamily,\n }}\n />\n );\n};\n\nexport default withTheme(ProgressIndicator);\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,SAASC,SAAS,QAAQ,YAAY;AAqBtC,MAAMC,iBAA2D,GAAG,QAe9D;EAAA,IAf+D;IACnEC,aAAa;IACbC,WAAW;IACXC,sBAAsB,GAAG,CAAC;IAC1BC,sBAAsB,GAAG,SAAS;IAClCC,iBAAiB;IACjBC,wBAAwB;IACxBC,yBAAyB;IACzBC,8BAA8B;IAC9BC,0BAA0B,GAAG,EAAE;IAC/BC,uBAAuB,GAAG,eAAe;IACzCC,yBAAyB,GAAG,SAAS;IACrCC,eAAe,GAAG,OAAO;IACzBC,aAAa,GAAG,SAAS;IACzBC;EACF,CAAC;EACC,MAAMC,eAAe,GAAGb,WAAW,GAAG,CAAC;EACvC,oBACE,oBAAC,aAAa;IACZ,SAAS,EAAED,aAAc;IACzB,eAAe,EAAEc,eAAgB;IACjC,YAAY,EAAE;MACZV,iBAAiB;MACjBC,wBAAwB,EAAEA,wBAAwB,GAC9CA,wBAAwB,GACxBD,iBAAiB;MACrBW,uBAAuB,EAAEH,aAAa;MACtCI,yBAAyB,EAAEL,eAAe;MAC1CM,sBAAsB,EAAEL,aAAa;MACrCM,wBAAwB,EAAEP,eAAe;MACzCQ,0BAA0B,EAAEP,aAAa;MACzCQ,4BAA4B,EAAET,eAAe;MAC7CT,sBAAsB;MACtBC,sBAAsB,EACpBA,sBAAsB,IAAIG,yBAAyB;MACrDe,iCAAiC,EAAEX,yBAAyB;MAC5DY,+BAA+B,EAAEb,uBAAuB;MACxDH,yBAAyB,EAAEA,yBAAyB,IAAIK,eAAe;MACvEJ,8BAA8B,EAC5BA,8BAA8B,IAAIG,yBAAyB;MAC7DF,0BAA0B;MAC1Be,eAAe,EAAEV,KAAK,CAACW,UAAU,CAACC,KAAK,CAACC;IAC1C;EAAE,EACF;AAEN,CAAC;AAED,eAAe5B,SAAS,CAACC,iBAAiB,CAAC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import Config from "../Config";
|
|
5
4
|
import IconButton from "../IconButton";
|
|
6
5
|
import { getValueForRadioButton } from "../../utilities";
|
|
7
6
|
import { useRadioButtonGroupContext } from "./context";
|
|
8
|
-
|
|
9
7
|
const RadioButton = _ref => {
|
|
10
8
|
let {
|
|
11
9
|
Icon,
|
|
@@ -27,13 +25,11 @@ const RadioButton = _ref => {
|
|
|
27
25
|
} = useRadioButtonGroupContext();
|
|
28
26
|
const realValue = getValueForRadioButton(value);
|
|
29
27
|
const realContextValue = getValueForRadioButton(contextValue);
|
|
30
|
-
const isSelected = selected
|
|
31
|
-
|
|
28
|
+
const isSelected = selected ?? realContextValue === realValue;
|
|
32
29
|
const handlePress = () => {
|
|
33
30
|
onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
|
|
34
31
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
35
32
|
};
|
|
36
|
-
|
|
37
33
|
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
38
34
|
Icon: Icon,
|
|
39
35
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
@@ -44,5 +40,5 @@ const RadioButton = _ref => {
|
|
|
44
40
|
style: style
|
|
45
41
|
}, rest));
|
|
46
42
|
};
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
export default RadioButton;
|
|
44
|
+
//# sourceMappingURL=RadioButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Config","IconButton","getValueForRadioButton","useRadioButtonGroupContext","RadioButton","Icon","disabled","color","value","selected","unselectedColor","onPress","size","radioButtonSize","selectedIcon","unselectedIcon","style","rest","contextValue","onValueChange","realValue","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,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,UAAU,MAAM,eAAe;AACtC,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,0BAA0B,QAAQ,WAAW;AAiBtD,MAAMC,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,GAAGZ,MAAM,CAACa,eAAe;IAC7BC,YAAY,GAAG,oCAAoC;IACnDC,cAAc,GAAG,sCAAsC;IACvDC,KAAK;IACL,GAAGC;EACL,CAAC;EACC,MAAM;IAAET,KAAK,EAAEU,YAAY;IAAEC;EAAc,CAAC,GAAGhB,0BAA0B,EAAE;EAE3E,MAAMiB,SAAS,GAAGlB,sBAAsB,CAACM,KAAK,CAAC;EAC/C,MAAMa,gBAAgB,GAAGnB,sBAAsB,CAACgB,YAAY,CAAC;EAC7D,MAAMI,UAAU,GAAGb,QAAQ,IAAIY,gBAAgB,KAAKD,SAAS;EAE7D,MAAMG,WAAW,GAAG,MAAM;IACxBZ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGS,SAAS,CAAC;IACpBD,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAGC,SAAS,CAAC;EAC5B,CAAC;EAED,oBACE,oBAAC,UAAU;IACT,IAAI,EAAEf,IAAK;IACX,IAAI,EAAEiB,UAAU,GAAGR,YAAY,GAAGC,cAAe;IACjD,KAAK,EAAEO,UAAU,GAAGf,KAAK,GAAGG,eAAgB;IAC5C,QAAQ,EAAEJ,QAAS;IACnB,OAAO,EAAEiB,WAAY;IACrB,IAAI,EAAEX,IAAK;IACX,KAAK,EAAEI;EAAM,GACTC,IAAI,EACR;AAEN,CAAC;AAED,eAAeb,WAAW"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React from "react";
|
|
4
3
|
import { View } from "react-native";
|
|
5
4
|
import Text from "../Text";
|
|
6
5
|
import { withTheme } from "../../theming";
|
|
7
6
|
import RadioButtonGroup from "./RadioButtonGroup";
|
|
8
|
-
|
|
9
7
|
const RadioButtonFieldGroup = _ref => {
|
|
10
8
|
let {
|
|
11
9
|
label,
|
|
@@ -26,5 +24,5 @@ const RadioButtonFieldGroup = _ref => {
|
|
|
26
24
|
theme: theme
|
|
27
25
|
}, rest), children));
|
|
28
26
|
};
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
export default withTheme(RadioButtonFieldGroup);
|
|
28
|
+
//# sourceMappingURL=RadioButtonFieldGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","Text","withTheme","RadioButtonGroup","RadioButtonFieldGroup","label","children","theme","labelStyle","style","rest","fontSize","typography","headline4","color"],"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,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAyC,cAAc;AACpE,OAAOC,IAAI,MAAM,SAAS;AAC1B,SAASC,SAAS,QAAQ,eAAe;AACzC,OAAOC,gBAAgB,MAAiC,oBAAoB;AAQ5E,MAAMC,qBAA+D,GAAG,QAOlE;EAAA,IAPmE;IACvEC,KAAK;IACLC,QAAQ;IACRC,KAAK;IACLC,UAAU;IACVC,KAAK;IACL,GAAGC;EACL,CAAC;EACC,oBACE,oBAAC,IAAI;IAAC,KAAK,EAAED;EAAM,gBACjB,oBAAC,IAAI;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,oBAAC,gBAAgB;IAAC,KAAK,EAAEE;EAAM,GAAKG,IAAI,GACrCJ,QAAQ,CACQ,CACd;AAEX,CAAC;AAED,eAAeJ,SAAS,CAACE,qBAAqB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import { View } from "react-native";
|
|
5
4
|
import { getValueForRadioButton } from "../../utilities";
|
|
@@ -7,7 +6,6 @@ import { radioButtonGroupContext, Direction } from "./context";
|
|
|
7
6
|
const {
|
|
8
7
|
Provider
|
|
9
8
|
} = radioButtonGroupContext;
|
|
10
|
-
|
|
11
9
|
const RadioButtonGroup = _ref => {
|
|
12
10
|
let {
|
|
13
11
|
direction = Direction.Vertical,
|
|
@@ -31,23 +29,19 @@ const RadioButtonGroup = _ref => {
|
|
|
31
29
|
setInternalValue(realDefaultValue);
|
|
32
30
|
}
|
|
33
31
|
}, [defaultValue]);
|
|
34
|
-
|
|
35
32
|
const handleValueChange = newValue => {
|
|
36
33
|
const realNewValue = getValueForRadioButton(newValue);
|
|
37
34
|
setInternalValue(realNewValue);
|
|
38
35
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realNewValue);
|
|
39
36
|
};
|
|
40
|
-
|
|
41
37
|
const _containerStyle = [{
|
|
42
38
|
flexDirection: direction === Direction.Horizontal ? "row" : "column"
|
|
43
39
|
}];
|
|
44
|
-
|
|
45
40
|
if (direction !== Direction.Vertical) {
|
|
46
41
|
_containerStyle.push({
|
|
47
42
|
alignItems: "center"
|
|
48
43
|
});
|
|
49
44
|
}
|
|
50
|
-
|
|
51
45
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
52
46
|
style: [{
|
|
53
47
|
minHeight: 40
|
|
@@ -62,5 +56,5 @@ const RadioButtonGroup = _ref => {
|
|
|
62
56
|
style: _containerStyle
|
|
63
57
|
}, children)));
|
|
64
58
|
};
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
export default RadioButtonGroup;
|
|
60
|
+
//# sourceMappingURL=RadioButtonGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","getValueForRadioButton","radioButtonGroupContext","Direction","Provider","RadioButtonGroup","direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","useState","useEffect","realValue","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,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAA8B,cAAc;AAEzD,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,uBAAuB,EAAEC,SAAS,QAAQ,WAAW;AAW9D,MAAM;EAAEC;AAAS,CAAC,GAAGF,uBAAuB;AAE5C,MAAMG,gBAAiD,GAAG,QAQpD;EAAA,IARqD;IACzDC,SAAS,GAAGH,SAAS,CAACI,QAAQ;IAC9BC,KAAK,GAAG,EAAE;IACVC,aAAa;IACbC,YAAY;IACZC,KAAK;IACLC,QAAQ;IACR,GAAGC;EACL,CAAC;EACC,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGhB,KAAK,CAACiB,QAAQ,CAAC,EAAE,CAAC;EAE5DjB,KAAK,CAACkB,SAAS,CAAC,MAAM;IACpB,IAAIT,KAAK,IAAI,IAAI,EAAE;MACjB,MAAMU,SAAS,GAAGjB,sBAAsB,CAACO,KAAK,CAAC;MAE/CO,gBAAgB,CAACG,SAAS,CAAC;IAC7B;EACF,CAAC,EAAE,CAACV,KAAK,CAAC,CAAC;EAEXT,KAAK,CAACkB,SAAS,CAAC,MAAM;IACpB,IAAIP,YAAY,IAAI,IAAI,EAAE;MACxB,MAAMS,gBAAgB,GAAGlB,sBAAsB,CAACS,YAAY,CAAC;MAE7DK,gBAAgB,CAACI,gBAAgB,CAAC;IACpC;EACF,CAAC,EAAE,CAACT,YAAY,CAAC,CAAC;EAElB,MAAMU,iBAAiB,GAAIC,QAAyB,IAAK;IACvD,MAAMC,YAAY,GAAGrB,sBAAsB,CAACoB,QAAQ,CAAC;IAErDN,gBAAgB,CAACO,YAAY,CAAC;IAC9Bb,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAGa,YAAY,CAAC;EAC/B,CAAC;EAED,MAAMC,eAAqC,GAAG,CAC5C;IACEC,aAAa,EAAElB,SAAS,KAAKH,SAAS,CAACsB,UAAU,GAAG,KAAK,GAAG;EAC9D,CAAC,CACF;EAED,IAAInB,SAAS,KAAKH,SAAS,CAACI,QAAQ,EAAE;IACpCgB,eAAe,CAACG,IAAI,CAAC;MACnBC,UAAU,EAAE;IACd,CAAC,CAAC;EACJ;EAEA,oBACE,oBAAC,IAAI;IAAC,KAAK,EAAE,CAAC;MAAEC,SAAS,EAAE;IAAG,CAAC,EAAEjB,KAAK;EAAE,GAAKE,IAAI,gBAC/C,oBAAC,QAAQ;IACP,KAAK,EAAE;MACLL,KAAK,EAAEM,aAAa;MACpBL,aAAa,EAAEW,iBAAiB;MAChCd;IACF;EAAE,gBAEF,oBAAC,IAAI;IAAC,KAAK,EAAEiB;EAAgB,GAAEX,QAAQ,CAAQ,CACtC,CACN;AAEX,CAAC;AAED,eAAeP,gBAAgB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import { StyleSheet, View, Platform } from "react-native";
|
|
5
4
|
import RadioButton from "./RadioButton";
|
|
@@ -9,12 +8,10 @@ import { Direction as GroupDirection } from "./context";
|
|
|
9
8
|
import Touchable from "../Touchable";
|
|
10
9
|
import { extractStyles, getValueForRadioButton } from "../../utilities";
|
|
11
10
|
export let Direction;
|
|
12
|
-
|
|
13
11
|
(function (Direction) {
|
|
14
12
|
Direction["Row"] = "row";
|
|
15
13
|
Direction["RowReverse"] = "row-reverse";
|
|
16
14
|
})(Direction || (Direction = {}));
|
|
17
|
-
|
|
18
15
|
const getRadioButtonAlignment = (parentDirection, direction) => {
|
|
19
16
|
if (parentDirection === GroupDirection.Horizontal) {
|
|
20
17
|
return direction === Direction.Row ? "flex-start" : "flex-end";
|
|
@@ -24,7 +21,6 @@ const getRadioButtonAlignment = (parentDirection, direction) => {
|
|
|
24
21
|
return "flex-end";
|
|
25
22
|
}
|
|
26
23
|
};
|
|
27
|
-
|
|
28
24
|
const renderLabel = (value, labelStyle, textStyle) => {
|
|
29
25
|
if (typeof value === "string") {
|
|
30
26
|
return /*#__PURE__*/React.createElement(Text, {
|
|
@@ -34,7 +30,6 @@ const renderLabel = (value, labelStyle, textStyle) => {
|
|
|
34
30
|
return /*#__PURE__*/React.createElement(React.Fragment, null, value);
|
|
35
31
|
}
|
|
36
32
|
};
|
|
37
|
-
|
|
38
33
|
const RadioButtonRow = _ref => {
|
|
39
34
|
let {
|
|
40
35
|
Icon,
|
|
@@ -59,13 +54,11 @@ const RadioButtonRow = _ref => {
|
|
|
59
54
|
} = useRadioButtonGroupContext();
|
|
60
55
|
const realValue = getValueForRadioButton(value);
|
|
61
56
|
const realContextValue = getValueForRadioButton(contextValue);
|
|
62
|
-
const isSelected = selected
|
|
63
|
-
|
|
57
|
+
const isSelected = selected ?? realContextValue === realValue;
|
|
64
58
|
const handlePress = () => {
|
|
65
59
|
onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
|
|
66
60
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
67
61
|
};
|
|
68
|
-
|
|
69
62
|
const {
|
|
70
63
|
textStyles,
|
|
71
64
|
viewStyles
|
|
@@ -94,7 +87,6 @@ const RadioButtonRow = _ref => {
|
|
|
94
87
|
style: radioButtonStyle
|
|
95
88
|
})));
|
|
96
89
|
};
|
|
97
|
-
|
|
98
90
|
const styles = StyleSheet.create({
|
|
99
91
|
mainParent: {
|
|
100
92
|
alignItems: "center",
|
|
@@ -114,4 +106,5 @@ const styles = StyleSheet.create({
|
|
|
114
106
|
flex: 3
|
|
115
107
|
}
|
|
116
108
|
});
|
|
117
|
-
export default RadioButtonRow;
|
|
109
|
+
export default RadioButtonRow;
|
|
110
|
+
//# sourceMappingURL=RadioButtonRow.js.map
|