@draftbit/core 48.4.8-d976c5.2 → 48.4.8-f6d6b8.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/package.json +3 -3
- package/src/Provider.js +0 -10
- package/src/Provider.js.map +0 -1
- package/src/components/AccordionGroup.js +0 -45
- package/src/components/AccordionGroup.js.map +0 -1
- package/src/components/ActionSheet/ActionSheet.js +0 -46
- package/src/components/ActionSheet/ActionSheet.js.map +0 -1
- package/src/components/ActionSheet/ActionSheetCancel.js +0 -7
- package/src/components/ActionSheet/ActionSheetCancel.js.map +0 -1
- package/src/components/ActionSheet/ActionSheetItem.js +0 -31
- package/src/components/ActionSheet/ActionSheetItem.js.map +0 -1
- package/src/components/ActionSheet/index.js +0 -4
- package/src/components/ActionSheet/index.js.map +0 -1
- package/src/components/AspectRatio.js +0 -19
- package/src/components/AspectRatio.js.map +0 -1
- package/src/components/BottomSheet/BottomSheet.js +0 -72
- package/src/components/BottomSheet/BottomSheet.js.map +0 -1
- package/src/components/BottomSheet/BottomSheetComponent.js +0 -438
- package/src/components/BottomSheet/BottomSheetComponent.js.map +0 -1
- package/src/components/BottomSheet/index.js +0 -2
- package/src/components/BottomSheet/index.js.map +0 -1
- package/src/components/Button.js +0 -121
- package/src/components/Button.js.map +0 -1
- package/src/components/Checkbox/Checkbox.js +0 -63
- package/src/components/Checkbox/Checkbox.js.map +0 -1
- package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
- package/src/components/Checkbox/CheckboxGroupRow.js.map +0 -1
- package/src/components/Checkbox/CheckboxRow.js +0 -78
- package/src/components/Checkbox/CheckboxRow.js.map +0 -1
- package/src/components/Checkbox/context.js +0 -15
- package/src/components/Checkbox/context.js.map +0 -1
- package/src/components/Checkbox/index.js +0 -3
- package/src/components/Checkbox/index.js.map +0 -1
- package/src/components/Config.js +0 -65
- package/src/components/Config.js.map +0 -1
- package/src/components/DatePicker/DatePicker.js +0 -384
- package/src/components/DatePicker/DatePicker.js.map +0 -1
- package/src/components/DatePicker/DatePickerComponent.js +0 -14
- package/src/components/DatePicker/DatePickerComponent.js.map +0 -1
- package/src/components/DatePicker/DatePickerComponent.web.js +0 -31
- package/src/components/DatePicker/DatePickerComponent.web.js.map +0 -1
- package/src/components/DatePicker/DatePickerComponentType.js +0 -2
- package/src/components/DatePicker/DatePickerComponentType.js.map +0 -1
- package/src/components/DeckSwiper/DeckSwiper.js +0 -91
- package/src/components/DeckSwiper/DeckSwiper.js.map +0 -1
- package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
- package/src/components/DeckSwiper/DeckSwiperCard.js.map +0 -1
- package/src/components/DeckSwiper/index.js +0 -3
- package/src/components/DeckSwiper/index.js.map +0 -1
- package/src/components/Divider.js +0 -14
- package/src/components/Divider.js.map +0 -1
- package/src/components/Elevation.js +0 -21
- package/src/components/Elevation.js.map +0 -1
- package/src/components/FormRow.js +0 -20
- package/src/components/FormRow.js.map +0 -1
- package/src/components/IconButton.js +0 -36
- package/src/components/IconButton.js.map +0 -1
- package/src/components/Image.js +0 -48
- package/src/components/Image.js.map +0 -1
- package/src/components/Layout/AspectRatio.js +0 -7
- package/src/components/Layout/AspectRatio.js.map +0 -1
- package/src/components/Layout/Center.js +0 -15
- package/src/components/Layout/Center.js.map +0 -1
- package/src/components/Layout/Circle.js +0 -16
- package/src/components/Layout/Circle.js.map +0 -1
- package/src/components/Layout/HStack.js +0 -12
- package/src/components/Layout/HStack.js.map +0 -1
- package/src/components/Layout/LayoutCommon.js +0 -8
- package/src/components/Layout/LayoutCommon.js.map +0 -1
- package/src/components/Layout/Spacer.js +0 -15
- package/src/components/Layout/Spacer.js.map +0 -1
- package/src/components/Layout/Square.js +0 -25
- package/src/components/Layout/Square.js.map +0 -1
- package/src/components/Layout/VStack.js +0 -12
- package/src/components/Layout/VStack.js.map +0 -1
- package/src/components/Layout/ZStack.js +0 -20
- package/src/components/Layout/ZStack.js.map +0 -1
- package/src/components/Layout/index.js +0 -9
- package/src/components/Layout/index.js.map +0 -1
- package/src/components/Markdown.js +0 -11
- package/src/components/Markdown.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js +0 -2
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +0 -126
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +0 -93
- package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/index.js +0 -15
- package/src/components/MediaPlayer/AudioPlayer/index.js.map +0 -1
- package/src/components/MediaPlayer/MediaPlaybackWrapper.js +0 -42
- package/src/components/MediaPlayer/MediaPlaybackWrapper.js.map +0 -1
- package/src/components/MediaPlayer/MediaPlayerCommon.js +0 -24
- package/src/components/MediaPlayer/MediaPlayerCommon.js.map +0 -1
- package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +0 -75
- package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js.map +0 -1
- package/src/components/MediaPlayer/VideoPlayer/index.js +0 -2
- package/src/components/MediaPlayer/VideoPlayer/index.js.map +0 -1
- package/src/components/NumberInput.js +0 -60
- package/src/components/NumberInput.js.map +0 -1
- package/src/components/Picker/Picker.js +0 -288
- package/src/components/Picker/Picker.js.map +0 -1
- package/src/components/Picker/PickerComponent.android.js +0 -70
- package/src/components/Picker/PickerComponent.android.js.map +0 -1
- package/src/components/Picker/PickerComponent.ios.js +0 -80
- package/src/components/Picker/PickerComponent.ios.js.map +0 -1
- package/src/components/Picker/PickerComponent.web.js +0 -71
- package/src/components/Picker/PickerComponent.web.js.map +0 -1
- package/src/components/Picker/PickerTypes.js +0 -2
- package/src/components/Picker/PickerTypes.js.map +0 -1
- package/src/components/PinInput/CustomPinInputCell.js +0 -11
- package/src/components/PinInput/CustomPinInputCell.js.map +0 -1
- package/src/components/PinInput/PinInput.js +0 -70
- package/src/components/PinInput/PinInput.js.map +0 -1
- package/src/components/PinInput/PinInputText.js +0 -14
- package/src/components/PinInput/PinInputText.js.map +0 -1
- package/src/components/PinInput/index.js +0 -4
- package/src/components/PinInput/index.js.map +0 -1
- package/src/components/Portal/Portal.js +0 -36
- package/src/components/Portal/Portal.js.map +0 -1
- package/src/components/Portal/PortalConsumer.js +0 -28
- package/src/components/Portal/PortalConsumer.js.map +0 -1
- package/src/components/Portal/PortalHost.js +0 -108
- package/src/components/Portal/PortalHost.js.map +0 -1
- package/src/components/Portal/PortalManager.js +0 -33
- package/src/components/Portal/PortalManager.js.map +0 -1
- package/src/components/Pressable.js +0 -13
- package/src/components/Pressable.js.map +0 -1
- package/src/components/Progress/CircularProgress/CircularProgress.js +0 -103
- package/src/components/Progress/CircularProgress/CircularProgress.js.map +0 -1
- package/src/components/Progress/CircularProgress/index.js +0 -14
- package/src/components/Progress/CircularProgress/index.js.map +0 -1
- package/src/components/Progress/IndeterminateProgress.js +0 -39
- package/src/components/Progress/IndeterminateProgress.js.map +0 -1
- package/src/components/Progress/LinearProgress/LinearProgress.js +0 -56
- package/src/components/Progress/LinearProgress/LinearProgress.js.map +0 -1
- package/src/components/Progress/LinearProgress/index.js +0 -14
- package/src/components/Progress/LinearProgress/index.js.map +0 -1
- package/src/components/Progress/ProgressCommon.js +0 -2
- package/src/components/Progress/ProgressCommon.js.map +0 -1
- package/src/components/ProgressIndicator.js +0 -28
- package/src/components/ProgressIndicator.js.map +0 -1
- package/src/components/RadioButton/RadioButton.js +0 -18
- package/src/components/RadioButton/RadioButton.js.map +0 -1
- package/src/components/RadioButton/RadioButtonGroup.js +0 -44
- package/src/components/RadioButton/RadioButtonGroup.js.map +0 -1
- package/src/components/RadioButton/RadioButtonRow.js +0 -77
- package/src/components/RadioButton/RadioButtonRow.js.map +0 -1
- package/src/components/RadioButton/context.js +0 -15
- package/src/components/RadioButton/context.js.map +0 -1
- package/src/components/RadioButton/index.js +0 -4
- package/src/components/RadioButton/index.js.map +0 -1
- package/src/components/Row.js +0 -49
- package/src/components/Row.js.map +0 -1
- package/src/components/SVG.js +0 -14
- package/src/components/SVG.js.map +0 -1
- package/src/components/ScreenContainer.js +0 -36
- package/src/components/ScreenContainer.js.map +0 -1
- package/src/components/SectionList/SectionHeader.js +0 -14
- package/src/components/SectionList/SectionHeader.js.map +0 -1
- package/src/components/SectionList/SectionList.js +0 -101
- package/src/components/SectionList/SectionList.js.map +0 -1
- package/src/components/SectionList/index.js +0 -3
- package/src/components/SectionList/index.js.map +0 -1
- package/src/components/Shadow.js +0 -26
- package/src/components/Shadow.js.map +0 -1
- package/src/components/Slider.js +0 -64
- package/src/components/Slider.js.map +0 -1
- package/src/components/StarRating.js +0 -51
- package/src/components/StarRating.js.map +0 -1
- package/src/components/StepIndicator.js +0 -347
- package/src/components/StepIndicator.js.map +0 -1
- package/src/components/Stepper.js +0 -42
- package/src/components/Stepper.js.map +0 -1
- package/src/components/Surface.js +0 -33
- package/src/components/Surface.js.map +0 -1
- package/src/components/SwipeableItem/SwipeableItem.js +0 -119
- package/src/components/SwipeableItem/SwipeableItem.js.map +0 -1
- package/src/components/SwipeableItem/SwipeableItemButton.js +0 -6
- package/src/components/SwipeableItem/SwipeableItemButton.js.map +0 -1
- package/src/components/SwipeableItem/SwipeableItemCommon.js +0 -44
- package/src/components/SwipeableItem/SwipeableItemCommon.js.map +0 -1
- package/src/components/SwipeableItem/SwipeableList.js +0 -29
- package/src/components/SwipeableItem/SwipeableList.js.map +0 -1
- package/src/components/SwipeableItem/index.js +0 -4
- package/src/components/SwipeableItem/index.js.map +0 -1
- package/src/components/Swiper/Swiper.js +0 -74
- package/src/components/Swiper/Swiper.js.map +0 -1
- package/src/components/Swiper/SwiperItem.js +0 -10
- package/src/components/Swiper/SwiperItem.js.map +0 -1
- package/src/components/Swiper/index.js +0 -3
- package/src/components/Swiper/index.js.map +0 -1
- package/src/components/Switch.js +0 -57
- package/src/components/Switch.js.map +0 -1
- package/src/components/TabView/TabView.js +0 -55
- package/src/components/TabView/TabView.js.map +0 -1
- package/src/components/TabView/TabViewItem.js +0 -12
- package/src/components/TabView/TabViewItem.js.map +0 -1
- package/src/components/TabView/index.js +0 -3
- package/src/components/TabView/index.js.map +0 -1
- package/src/components/Table/Table.js +0 -94
- package/src/components/Table/Table.js.map +0 -1
- package/src/components/Table/TableCell.js +0 -34
- package/src/components/Table/TableCell.js.map +0 -1
- package/src/components/Table/TableCommon.js +0 -13
- package/src/components/Table/TableCommon.js.map +0 -1
- package/src/components/Table/TableRow.js +0 -40
- package/src/components/Table/TableRow.js.map +0 -1
- package/src/components/Table/index.js +0 -4
- package/src/components/Table/index.js.map +0 -1
- package/src/components/Text.js +0 -34
- package/src/components/Text.js.map +0 -1
- package/src/components/TextField.js +0 -430
- package/src/components/TextField.js.map +0 -1
- package/src/components/TextInput.js +0 -15
- package/src/components/TextInput.js.map +0 -1
- package/src/components/Touchable.js +0 -13
- package/src/components/Touchable.js.map +0 -1
- package/src/components/Touchable.web.js +0 -3
- package/src/components/Touchable.web.js.map +0 -1
- package/src/components/Typography.js +0 -37
- package/src/components/Typography.js.map +0 -1
- package/src/components/YoutubePlayer/YoutubePlayer.js +0 -21
- package/src/components/YoutubePlayer/YoutubePlayer.js.map +0 -1
- package/src/components/YoutubePlayer/YoutubePlayer.native.js +0 -10
- package/src/components/YoutubePlayer/YoutubePlayer.native.js.map +0 -1
- package/src/components/YoutubePlayer/YoutubePlayerProps.js +0 -2
- package/src/components/YoutubePlayer/YoutubePlayerProps.js.map +0 -1
- package/src/components/YoutubePlayer/index.js +0 -2
- package/src/components/YoutubePlayer/index.js.map +0 -1
- package/src/components/useAuthState.js +0 -35
- package/src/components/useAuthState.js.map +0 -1
- package/src/constants.js +0 -11
- package/src/constants.js.map +0 -1
- package/src/deprecated-components/AccordionItem.js +0 -36
- package/src/deprecated-components/AccordionItem.js.map +0 -1
- package/src/deprecated-components/AnimatedCircularProgress.js +0 -47
- package/src/deprecated-components/AnimatedCircularProgress.js.map +0 -1
- package/src/deprecated-components/AvatarEdit.js +0 -34
- package/src/deprecated-components/AvatarEdit.js.map +0 -1
- package/src/deprecated-components/Banner.js +0 -113
- package/src/deprecated-components/Banner.js.map +0 -1
- package/src/deprecated-components/Card.js +0 -61
- package/src/deprecated-components/Card.js.map +0 -1
- package/src/deprecated-components/CheckboxGroup.js +0 -25
- package/src/deprecated-components/CheckboxGroup.js.map +0 -1
- package/src/deprecated-components/CircleImage.js +0 -12
- package/src/deprecated-components/CircleImage.js.map +0 -1
- package/src/deprecated-components/CircularProgress.js +0 -85
- package/src/deprecated-components/CircularProgress.js.map +0 -1
- package/src/deprecated-components/Container.js +0 -47
- package/src/deprecated-components/Container.js.map +0 -1
- package/src/deprecated-components/DeprecatedButton.js +0 -87
- package/src/deprecated-components/DeprecatedButton.js.map +0 -1
- package/src/deprecated-components/DeprecatedCardWrapper.js +0 -22
- package/src/deprecated-components/DeprecatedCardWrapper.js.map +0 -1
- package/src/deprecated-components/DeprecatedFAB.js +0 -118
- package/src/deprecated-components/DeprecatedFAB.js.map +0 -1
- package/src/deprecated-components/FAB.js +0 -50
- package/src/deprecated-components/FAB.js.map +0 -1
- package/src/deprecated-components/FieldSearchBarFull.js +0 -57
- package/src/deprecated-components/FieldSearchBarFull.js.map +0 -1
- package/src/deprecated-components/Layout.js +0 -69
- package/src/deprecated-components/Layout.js.map +0 -1
- package/src/deprecated-components/ProgressBar.js +0 -122
- package/src/deprecated-components/ProgressBar.js.map +0 -1
- package/src/deprecated-components/ProgressCircle.js +0 -17
- package/src/deprecated-components/ProgressCircle.js.map +0 -1
- package/src/deprecated-components/RadioButtonFieldGroup.js +0 -21
- package/src/deprecated-components/RadioButtonFieldGroup.js.map +0 -1
- package/src/deprecated-components/RowBodyIcon.js +0 -12
- package/src/deprecated-components/RowBodyIcon.js.map +0 -1
- package/src/deprecated-components/RowHeadlineImageCaption.js +0 -16
- package/src/deprecated-components/RowHeadlineImageCaption.js.map +0 -1
- package/src/deprecated-components/RowHeadlineImageIcon.js +0 -18
- package/src/deprecated-components/RowHeadlineImageIcon.js.map +0 -1
- package/src/deprecated-components/ToggleButton.js +0 -43
- package/src/deprecated-components/ToggleButton.js.map +0 -1
- package/src/hooks.js +0 -25
- package/src/hooks.js.map +0 -1
- package/src/index.js +0 -66
- package/src/index.js.map +0 -1
- package/src/interfaces/Icon.js +0 -9
- package/src/interfaces/Icon.js.map +0 -1
- package/src/styles/DarkTheme.js +0 -27
- package/src/styles/DarkTheme.js.map +0 -1
- package/src/styles/DefaultTheme.js +0 -112
- package/src/styles/DefaultTheme.js.map +0 -1
- package/src/styles/fonts.js +0 -63
- package/src/styles/fonts.js.map +0 -1
- package/src/styles/overlay.js +0 -61
- package/src/styles/overlay.js.map +0 -1
- package/src/styles/shadow.js +0 -52
- package/src/styles/shadow.js.map +0 -1
- package/src/theming.js +0 -4
- package/src/theming.js.map +0 -1
- package/src/utilities.js +0 -180
- package/src/utilities.js.map +0 -1
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import { SafeAreaView } from "react-native-safe-area-context";
|
|
4
|
-
import omit from "lodash.omit";
|
|
5
|
-
import { Picker as NativePicker } from "@react-native-picker/picker";
|
|
6
|
-
import { withTheme } from "../../theming";
|
|
7
|
-
import Portal from "../Portal/Portal";
|
|
8
|
-
import Button from "../../deprecated-components/DeprecatedButton";
|
|
9
|
-
import TextField from "../TextField";
|
|
10
|
-
import Touchable from "../Touchable";
|
|
11
|
-
import { extractStyles } from "../../utilities";
|
|
12
|
-
const Picker = ({ Icon, style, options, placeholder, selectedValue, disabled = false, onValueChange = () => { }, theme: { colors }, ...props }) => {
|
|
13
|
-
var _a, _b;
|
|
14
|
-
const { viewStyles: { borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
15
|
-
borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
16
|
-
borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
17
|
-
borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
18
|
-
borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
19
|
-
borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
20
|
-
borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
21
|
-
backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
22
|
-
padding, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
23
|
-
paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
24
|
-
paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
25
|
-
paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
26
|
-
paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
27
|
-
...viewStyles }, } = extractStyles(style);
|
|
28
|
-
const textField = React.useRef(undefined);
|
|
29
|
-
const [pickerVisible, setIsPickerVisible] = React.useState(false);
|
|
30
|
-
const toggleVisibility = () => {
|
|
31
|
-
setIsPickerVisible(!pickerVisible);
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()
|
|
34
|
-
};
|
|
35
|
-
const stylesWithoutMargin = style &&
|
|
36
|
-
omit(StyleSheet.flatten(style), [
|
|
37
|
-
"margin",
|
|
38
|
-
"marginTop",
|
|
39
|
-
"marginRight",
|
|
40
|
-
"marginBottom",
|
|
41
|
-
"marginLeft",
|
|
42
|
-
]);
|
|
43
|
-
const selectedLabel = selectedValue &&
|
|
44
|
-
((_b = (_a = options.find((o) => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
|
|
45
|
-
return (React.createElement(View, { style: [styles.container, viewStyles] },
|
|
46
|
-
React.createElement(Touchable, { disabled: disabled, onPress: toggleVisibility },
|
|
47
|
-
React.createElement(TextField, { ...props, value: String(selectedLabel), placeholder: placeholder,
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
ref: textField, disabled: disabled, pointerEvents: "none",
|
|
50
|
-
// @ts-expect-error
|
|
51
|
-
style: stylesWithoutMargin, Icon: Icon })),
|
|
52
|
-
pickerVisible && (React.createElement(Portal, null,
|
|
53
|
-
React.createElement(View, { style: [styles.picker, { backgroundColor: colors.divider }] },
|
|
54
|
-
React.createElement(SafeAreaView, { style: styles.pickerContainer },
|
|
55
|
-
React.createElement(Button, { Icon: Icon, type: "text", onPress: toggleVisibility, style: styles.closeButton }, "Close"),
|
|
56
|
-
React.createElement(NativePicker, { style: { backgroundColor: "white" }, selectedValue: selectedValue, onValueChange: onValueChange }, options.map((o) => (React.createElement(NativePicker.Item, { label: o.label, value: o.value, key: o.value }))))))))));
|
|
57
|
-
};
|
|
58
|
-
const styles = StyleSheet.create({
|
|
59
|
-
container: {
|
|
60
|
-
alignSelf: "stretch",
|
|
61
|
-
},
|
|
62
|
-
picker: {
|
|
63
|
-
position: "absolute",
|
|
64
|
-
bottom: 0,
|
|
65
|
-
left: 0,
|
|
66
|
-
right: 0,
|
|
67
|
-
flexDirection: "row",
|
|
68
|
-
justifyContent: "center",
|
|
69
|
-
},
|
|
70
|
-
pickerContainer: {
|
|
71
|
-
backgroundColor: "white",
|
|
72
|
-
flexDirection: "column",
|
|
73
|
-
width: "100%",
|
|
74
|
-
},
|
|
75
|
-
closeButton: {
|
|
76
|
-
alignSelf: "flex-end",
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
export default withTheme(Picker);
|
|
80
|
-
//# sourceMappingURL=PickerComponent.ios.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PickerComponent.ios.js","sourceRoot":"","sources":["PickerComponent.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,O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,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,MAAM,EACX,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,MAAM,CAAC,WAAW,YAGlB;oBACT,oBAAC,YAAY,IACX,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,EACnC,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,IAE3B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CACvB,oBAAC,YAAY,CAAC,IAAI,IAChB,KAAK,EAAE,CAAC,CAAC,KAAK,EACd,KAAK,EAAE,CAAC,CAAC,KAAK,EACd,GAAG,EAAE,CAAC,CAAC,KAAK,GACZ,CACH,CAAC,CACW,CACF,CACV,CACA,CACV,CACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,SAAS,EAAE,SAAS;KACrB;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,eAAe,EAAE;QACf,eAAe,EAAE,OAAO;QACxB,aAAa,EAAE,QAAQ;QACvB,KAAK,EAAE,MAAM;KACd;IACD,WAAW,EAAE;QACX,SAAS,EAAE,UAAU;KACtB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import { Picker as NativePicker } from "@react-native-picker/picker";
|
|
4
|
-
import omit from "lodash.omit";
|
|
5
|
-
import { withTheme } from "../../theming";
|
|
6
|
-
import { extractStyles } from "../../utilities";
|
|
7
|
-
import TextField from "../TextField";
|
|
8
|
-
import Touchable from "../Touchable";
|
|
9
|
-
const Picker = ({ style, options, placeholder, selectedValue, disabled = false, onValueChange: onValueChangeOverride = () => { }, ...props }) => {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
const { viewStyles: { borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
12
|
-
borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
13
|
-
borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
14
|
-
borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
15
|
-
borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
16
|
-
borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
17
|
-
borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
18
|
-
backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
19
|
-
padding, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
20
|
-
paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
21
|
-
paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
22
|
-
paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
23
|
-
paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
24
|
-
...viewStyles }, } = extractStyles(style);
|
|
25
|
-
const textField = React.useRef(undefined);
|
|
26
|
-
const onValueChange = (itemValue, itemIndex) => {
|
|
27
|
-
toggleFocus();
|
|
28
|
-
onValueChangeOverride(itemValue, itemIndex);
|
|
29
|
-
};
|
|
30
|
-
const toggleFocus = () => {
|
|
31
|
-
if (!disabled) {
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const stylesWithoutMargin = style &&
|
|
37
|
-
omit(StyleSheet.flatten(style), [
|
|
38
|
-
"margin",
|
|
39
|
-
"marginTop",
|
|
40
|
-
"marginRight",
|
|
41
|
-
"marginBottom",
|
|
42
|
-
"marginLeft",
|
|
43
|
-
]);
|
|
44
|
-
const selectedLabel = selectedValue &&
|
|
45
|
-
((_b = (_a = options.find((o) => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
|
|
46
|
-
return (React.createElement(Touchable, { disabled: disabled, onPress: toggleFocus, style: [styles.container, viewStyles] },
|
|
47
|
-
React.createElement(View, null,
|
|
48
|
-
React.createElement(NativePicker, { enabled: !disabled, selectedValue: selectedValue, onValueChange: onValueChange, style: {
|
|
49
|
-
flex: 1,
|
|
50
|
-
opacity: 0,
|
|
51
|
-
position: "absolute",
|
|
52
|
-
top: 0,
|
|
53
|
-
left: 0,
|
|
54
|
-
right: 0,
|
|
55
|
-
bottom: 0,
|
|
56
|
-
width: "100%",
|
|
57
|
-
} }, options.map((o) => (React.createElement(NativePicker.Item, { label: o.label, value: o.value, key: o.value })))),
|
|
58
|
-
React.createElement(View, { pointerEvents: "none" },
|
|
59
|
-
React.createElement(TextField, { ...props, value: selectedLabel, placeholder: placeholder,
|
|
60
|
-
// @ts-ignore
|
|
61
|
-
ref: textField, disabled: disabled,
|
|
62
|
-
// @ts-expect-error
|
|
63
|
-
style: stylesWithoutMargin })))));
|
|
64
|
-
};
|
|
65
|
-
const styles = StyleSheet.create({
|
|
66
|
-
container: {
|
|
67
|
-
alignSelf: "stretch",
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
export default withTheme(Picker);
|
|
71
|
-
//# sourceMappingURL=PickerComponent.web.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PickerComponent.web.js","sourceRoot":"","sources":["PickerComponent.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,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EAAE,SAAS,EACd,QAAQ,EAAE,QAAQ;oBAClB,mBAAmB;oBACnB,KAAK,EAAE,mBAAmB,GAC1B,CACG,CACF,CACG,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,SAAS,EAAE,SAAS;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PickerTypes.js","sourceRoot":"","sources":["PickerTypes.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
/**
|
|
4
|
-
* Simple View wrapper component to create a custom pin input cell
|
|
5
|
-
* Meant to be used in PinInput's renderItem
|
|
6
|
-
*/
|
|
7
|
-
const CustomPinInputCell = ({ style, children }) => {
|
|
8
|
-
return React.createElement(View, { style: style, children: children });
|
|
9
|
-
};
|
|
10
|
-
export default CustomPinInputCell;
|
|
11
|
-
//# sourceMappingURL=CustomPinInputCell.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomPinInputCell.js","sourceRoot":"","sources":["CustomPinInputCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAwB,IAAI,EAAE,MAAM,cAAc,CAAC;AAM1D;;;GAGG;AACH,MAAM,kBAAkB,GAEpB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC1B,OAAO,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;AACpD,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, StyleSheet, } from "react-native";
|
|
3
|
-
import TextInput from "../TextInput";
|
|
4
|
-
import { CodeField, useClearByFocusCell, } from "react-native-confirmation-code-field";
|
|
5
|
-
import { withTheme } from "../../theming";
|
|
6
|
-
import PinInputText from "./PinInputText";
|
|
7
|
-
import { extractStyles } from "../../utilities";
|
|
8
|
-
const PinInput = React.forwardRef(({ theme, onInputFull, cellCount = 4, clearOnCellFocus = true, blurOnFull = true, renderItem, value, onChangeText, focusedBorderColor = theme.colors.primary, unFocusedBorderColor = theme.colors.disabled, focusedBackgroundColor, unFocusedBackgroundColor, focusedBorderWidth = 2, unFocusedBorderWidth = 1, focusedTextColor = theme.colors.strong, unFocusedTextColor = focusedTextColor, style, ...rest }, ref) => {
|
|
9
|
-
const newPinInputRef = React.useRef(null);
|
|
10
|
-
// Use the provided ref or default to new ref when not provided
|
|
11
|
-
const pinInputRef = ref
|
|
12
|
-
? ref
|
|
13
|
-
: newPinInputRef;
|
|
14
|
-
const { viewStyles, textStyles } = extractStyles(style);
|
|
15
|
-
// Clears input of a cell when focused, configured as explained here (https://github.com/retyui/react-native-confirmation-code-field/blob/master/API.md#useclearbyfocuscellvalue-string-setvalue-text-string--void)
|
|
16
|
-
const [codeFieldProps, getCellOnLayout] = useClearByFocusCell({
|
|
17
|
-
value,
|
|
18
|
-
setValue: (text) => onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text),
|
|
19
|
-
});
|
|
20
|
-
React.useEffect(() => {
|
|
21
|
-
var _a;
|
|
22
|
-
if ((value === null || value === void 0 ? void 0 : value.length) === cellCount) {
|
|
23
|
-
if (blurOnFull) {
|
|
24
|
-
(_a = pinInputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
25
|
-
}
|
|
26
|
-
onInputFull === null || onInputFull === void 0 ? void 0 : onInputFull(value);
|
|
27
|
-
}
|
|
28
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
29
|
-
}, [value, cellCount, blurOnFull, pinInputRef]);
|
|
30
|
-
return (React.createElement(CodeField, { ref: pinInputRef, ...(clearOnCellFocus ? codeFieldProps : {}), value: value, onChangeText: onChangeText, textInputStyle: { height: "100%" }, InputComponent: TextInput, cellCount: cellCount, renderCell: ({ symbol: cellValue, index, isFocused }) => (React.createElement(View, { key: index, onLayout: clearOnCellFocus ? getCellOnLayout(index) : undefined, style: { flex: 1 } }, (renderItem === null || renderItem === void 0 ? void 0 : renderItem({ cellValue, index, isFocused })) || (React.createElement(View, { testID: "default-code-input-cell", style: [
|
|
31
|
-
styles.cell,
|
|
32
|
-
{
|
|
33
|
-
borderWidth: isFocused
|
|
34
|
-
? focusedBorderWidth
|
|
35
|
-
: unFocusedBorderWidth,
|
|
36
|
-
borderColor: isFocused
|
|
37
|
-
? focusedBorderColor
|
|
38
|
-
: unFocusedBorderColor,
|
|
39
|
-
backgroundColor: isFocused
|
|
40
|
-
? focusedBackgroundColor
|
|
41
|
-
: unFocusedBackgroundColor,
|
|
42
|
-
},
|
|
43
|
-
viewStyles,
|
|
44
|
-
] },
|
|
45
|
-
React.createElement(PinInputText, { style: [
|
|
46
|
-
styles.cellText,
|
|
47
|
-
{
|
|
48
|
-
color: isFocused ? focusedTextColor : unFocusedTextColor,
|
|
49
|
-
},
|
|
50
|
-
textStyles,
|
|
51
|
-
], isFocused: isFocused }, cellValue))))), ...rest }));
|
|
52
|
-
});
|
|
53
|
-
const styles = StyleSheet.create({
|
|
54
|
-
cell: {
|
|
55
|
-
marginStart: 5,
|
|
56
|
-
marginEnd: 5,
|
|
57
|
-
padding: 5,
|
|
58
|
-
borderRadius: 5,
|
|
59
|
-
justifyContent: "center",
|
|
60
|
-
alignItems: "center",
|
|
61
|
-
aspectRatio: 1,
|
|
62
|
-
maxWidth: 70,
|
|
63
|
-
maxHeight: 70,
|
|
64
|
-
},
|
|
65
|
-
cellText: {
|
|
66
|
-
fontSize: 25,
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
export default withTheme(PinInput);
|
|
70
|
-
//# sourceMappingURL=PinInput.js.map
|
|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yBAAyB,EAChC,KAAK,EAAE;gBACL,MAAM,CAAC,IAAI;gBACX;oBACE,WAAW,EAAE,SAAS;wBACpB,CAAC,CAAC,kBAAkB;wBACpB,CAAC,CAAC,oBAAoB;oBACxB,WAAW,EAAE,SAAS;wBACpB,CAAC,CAAC,kBAAkB;wBACpB,CAAC,CAAC,oBAAoB;oBACxB,eAAe,EAAE,SAAS;wBACxB,CAAC,CAAC,sBAAsB;wBACxB,CAAC,CAAC,wBAAwB;iBAC7B;gBACD,UAAU;aACX;YAED,oBAAC,YAAY,IACX,KAAK,EAAE;oBACL,MAAM,CAAC,QAAQ;oBACf;wBACE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,kBAAkB;qBACzD;oBACD,UAAU;iBACX,EACD,SAAS,EAAE,SAAS,IAEnB,SAAS,CACG,CACV,CACR,CACI,CACR,KACG,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,WAAW,EAAE,CAAC;QACd,SAAS,EAAE,CAAC;QACZ,OAAO,EAAE,CAAC;QACV,YAAY,EAAE,CAAC;QACf,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,CAAC;QACd,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;KACd;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Text } from "react-native";
|
|
3
|
-
import { withTheme } from "../../theming";
|
|
4
|
-
import { Cursor } from "react-native-confirmation-code-field";
|
|
5
|
-
/**
|
|
6
|
-
* Text component that can conditionally render a blinking cursor when focused and empty
|
|
7
|
-
* Meant to be used within a CustomPinInputCell component
|
|
8
|
-
*/
|
|
9
|
-
const CustomPinInputText = ({ isFocused, cursorBlinkDuration, cursorText, style, theme, children, ...rest }) => {
|
|
10
|
-
return (React.createElement(Text, { style: [{ color: theme.colors.strong }, style], ...rest }, children ||
|
|
11
|
-
(isFocused ? (React.createElement(Cursor, { cursorSymbol: cursorText, delay: cursorBlinkDuration })) : null)));
|
|
12
|
-
};
|
|
13
|
-
export default withTheme(CustomPinInputText);
|
|
14
|
-
//# sourceMappingURL=PinInputText.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PinInputText.js","sourceRoot":"","sources":["PinInputText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAa,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAS9D;;;GAGG;AACH,MAAM,kBAAkB,GAAsC,CAAC,EAC7D,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,EAAE;IACH,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,KAAM,IAAI,IAC3D,QAAQ;QACP,CAAC,SAAS,CAAC,CAAC,CAAC,CACX,oBAAC,MAAM,IAAC,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,mBAAmB,GAAI,CACjE,CAAC,CAAC,CAAC,IAAI,CAAC,CACN,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import PortalConsumer from "./PortalConsumer";
|
|
3
|
-
import PortalHost, { PortalContext } from "./PortalHost";
|
|
4
|
-
import { ThemeProvider, withTheme } from "../../theming";
|
|
5
|
-
/**
|
|
6
|
-
* Portal allows to render a component at a different place in the parent tree.
|
|
7
|
-
* You can use it to render content which should appear above other elements, similar to `Modal`.
|
|
8
|
-
* It requires a [`Portal.Host`](portal-host.html) component to be rendered somewhere in the parent tree.
|
|
9
|
-
*
|
|
10
|
-
* ## Usage
|
|
11
|
-
* ```js
|
|
12
|
-
* import * as React from 'react';
|
|
13
|
-
* import { Portal, Text } from 'react-native-paper';
|
|
14
|
-
*
|
|
15
|
-
* export default class MyComponent extends React.Component {
|
|
16
|
-
* render() {
|
|
17
|
-
* return (
|
|
18
|
-
* <Portal>
|
|
19
|
-
* <Text>This is rendered at a different place</Text>
|
|
20
|
-
* </Portal>
|
|
21
|
-
* );
|
|
22
|
-
* }
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
class Portal extends React.Component {
|
|
27
|
-
render() {
|
|
28
|
-
const { children, theme } = this.props;
|
|
29
|
-
return (React.createElement(PortalContext.Consumer, null, (manager) => (React.createElement(PortalConsumer, { manager: manager },
|
|
30
|
-
React.createElement(ThemeProvider, { theme: theme }, children)))));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
// @component ./PortalHost.tsx
|
|
34
|
-
Portal.Host = PortalHost;
|
|
35
|
-
export default withTheme(Portal);
|
|
36
|
-
//# sourceMappingURL=Portal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Portal.js","sourceRoot":"","sources":["Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,UAAU,EAAE,EAAE,aAAa,EAAiB,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAczD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAO,SAAQ,KAAK,CAAC,SAAgB;IAIzC,MAAM;QACJ,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEvC,OAAO,CACL,oBAAC,aAAa,CAAC,QAAQ,QACpB,CAAC,OAAO,EAAE,EAAE,CAAC,CACZ,oBAAC,cAAc,IAAC,OAAO,EAAE,OAAwB;YAE/C,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,IAAG,QAAQ,CAAiB,CACxC,CAClB,CACsB,CAC1B,CAAC;IACJ,CAAC;;AAhBD,8BAA8B;AACvB,WAAI,GAAG,UAAU,CAAC;AAkB3B,eAAe,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export default class PortalConsumer extends React.Component {
|
|
3
|
-
async componentDidMount() {
|
|
4
|
-
this.checkManager();
|
|
5
|
-
// Delay updating to prevent React from going to infinite loop
|
|
6
|
-
await Promise.resolve();
|
|
7
|
-
this.key = this.props.manager.mount(this.props.children);
|
|
8
|
-
}
|
|
9
|
-
componentDidUpdate() {
|
|
10
|
-
this.checkManager();
|
|
11
|
-
this.props.manager.update(this.key, this.props.children);
|
|
12
|
-
}
|
|
13
|
-
componentWillUnmount() {
|
|
14
|
-
this.checkManager();
|
|
15
|
-
this.props.manager.unmount(this.key);
|
|
16
|
-
}
|
|
17
|
-
checkManager() {
|
|
18
|
-
if (!this.props.manager) {
|
|
19
|
-
throw new Error("Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\n\n" +
|
|
20
|
-
"Please read our getting-started guide and make sure you've followed all the required steps.\n\n" +
|
|
21
|
-
"https://callstack.github.io/react-native-paper/getting-started.html");
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=PortalConsumer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PortalConsumer.js","sourceRoot":"","sources":["PortalConsumer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,SAAgB;IAChE,KAAK,CAAC,iBAAiB;QACrB,IAAI,CAAC,YAAY,EAAE,CAAC;QAEpB,8DAA8D;QAC9D,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QAExB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,YAAY,EAAE,CAAC;QAEpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,YAAY,EAAE,CAAC;QAEpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAIO,YAAY;QAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACvB,MAAM,IAAI,KAAK,CACb,4GAA4G;gBAC1G,iGAAiG;gBACjG,qEAAqE,CACxE,CAAC;SACH;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import PortalManager from "./PortalManager";
|
|
4
|
-
export const PortalContext = React.createContext(null);
|
|
5
|
-
/**
|
|
6
|
-
* Portal host renders all of its children `Portal` elements.
|
|
7
|
-
* For example, you can wrap a screen in `Portal.Host` to render items above the screen.
|
|
8
|
-
* If you're using the `Provider` component, it already includes `Portal.Host`.
|
|
9
|
-
*
|
|
10
|
-
* ## Usage
|
|
11
|
-
* ```js
|
|
12
|
-
* import * as React from 'react';
|
|
13
|
-
* import { Text } from 'react-native';
|
|
14
|
-
* import { Portal } from 'react-native-paper';
|
|
15
|
-
*
|
|
16
|
-
* export default class MyComponent extends React.Component {
|
|
17
|
-
* render() {
|
|
18
|
-
* return (
|
|
19
|
-
* <Portal.Host>
|
|
20
|
-
* <Text>Content of the app</Text>
|
|
21
|
-
* </Portal.Host>
|
|
22
|
-
* );
|
|
23
|
-
* }
|
|
24
|
-
* }
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* Here any `Portal` elements under `<App />` are rendered alongside `<App />` and will appear above `<App />` like a `Modal`.
|
|
28
|
-
*/
|
|
29
|
-
export default class PortalHost extends React.Component {
|
|
30
|
-
constructor() {
|
|
31
|
-
super(...arguments);
|
|
32
|
-
this.setManager = (manager) => {
|
|
33
|
-
this.manager = manager;
|
|
34
|
-
};
|
|
35
|
-
this.mount = (children) => {
|
|
36
|
-
const key = this.nextKey++;
|
|
37
|
-
if (this.manager) {
|
|
38
|
-
this.manager.mount(key, children);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this.queue.push({ type: "mount", key, children });
|
|
42
|
-
}
|
|
43
|
-
return key;
|
|
44
|
-
};
|
|
45
|
-
this.update = (key, children) => {
|
|
46
|
-
if (this.manager) {
|
|
47
|
-
this.manager.update(key, children);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
const op = { type: "mount", key, children };
|
|
51
|
-
const index = this.queue.findIndex((o) => o.type === "mount" || (o.type === "update" && o.key === key));
|
|
52
|
-
if (index > -1) {
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
this.queue[index] = op;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this.queue.push(op);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
this.unmount = (key) => {
|
|
62
|
-
if (this.manager) {
|
|
63
|
-
this.manager.unmount(key);
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
this.queue.push({ type: "unmount", key });
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
this.nextKey = 0;
|
|
70
|
-
this.queue = [];
|
|
71
|
-
}
|
|
72
|
-
componentDidMount() {
|
|
73
|
-
const manager = this.manager;
|
|
74
|
-
const queue = this.queue;
|
|
75
|
-
while (queue.length && manager) {
|
|
76
|
-
const action = queue.pop();
|
|
77
|
-
if (action) {
|
|
78
|
-
switch (action.type) {
|
|
79
|
-
case "mount":
|
|
80
|
-
manager.mount(action.key, action.children);
|
|
81
|
-
break;
|
|
82
|
-
case "update":
|
|
83
|
-
manager.update(action.key, action.children);
|
|
84
|
-
break;
|
|
85
|
-
case "unmount":
|
|
86
|
-
manager.unmount(action.key);
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
render() {
|
|
93
|
-
return (React.createElement(PortalContext.Provider, { value: {
|
|
94
|
-
mount: this.mount,
|
|
95
|
-
update: this.update,
|
|
96
|
-
unmount: this.unmount,
|
|
97
|
-
} },
|
|
98
|
-
React.createElement(View, { style: styles.container, collapsable: false, pointerEvents: "box-none" }, this.props.children),
|
|
99
|
-
React.createElement(PortalManager, { ref: this.setManager })));
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
PortalHost.displayName = "Portal.Host";
|
|
103
|
-
const styles = StyleSheet.create({
|
|
104
|
-
container: {
|
|
105
|
-
flex: 1,
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
//# sourceMappingURL=PortalHost.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PortalHost.js","sourceRoot":"","sources":["PortalHost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAiB5C,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAgB,IAAW,CAAC,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK,CAAC,SAAgB;IAA9D;;QAyBU,eAAU,GAAG,CAAC,OAAyC,EAAE,EAAE;YACjE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC,CAAC;QAEM,UAAK,GAAG,CAAC,QAAyB,EAAE,EAAE;YAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YAE3B,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;aACnC;iBAAM;gBACL,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;aACnD;YAED,OAAO,GAAG,CAAC;QACb,CAAC,CAAC;QAEM,WAAM,GAAG,CAAC,GAAW,EAAE,QAAyB,EAAE,EAAE;YAC1D,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,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AC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;wBAC3C,MAAM;oBACR,KAAK,QAAQ;wBACX,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;wBAC5C,MAAM;oBACR,KAAK,SAAS;wBACZ,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;wBAC5B,MAAM;iBACT;aACF;SACF;IACH,CAAC;IAgDD,MAAM;QACJ,OAAO,CACL,oBAAC,aAAa,CAAC,QAAQ,IACrB,KAAK,EAAE;gBACL,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB;YAGD,oBAAC,IAAI,IACH,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,WAAW,EAAE,KAAK,EAClB,aAAa,EAAC,UAAU,IAEvB,IAAI,CAAC,KAAK,CAAC,QAAQ,CACf;YACP,oBAAC,aAAa,IAAC,GAAG,EAAE,IAAI,CAAC,UAAU,GAAI,CAChB,CAC1B,CAAC;IACJ,CAAC;;AA1FM,sBAAW,GAAG,aAAa,CAAC;AA6FrC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, StyleSheet } from "react-native";
|
|
3
|
-
/**
|
|
4
|
-
* Portal host is the component which actually renders all Portals.
|
|
5
|
-
*/
|
|
6
|
-
export default class PortalManager extends React.PureComponent {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.state = {
|
|
10
|
-
portals: [],
|
|
11
|
-
};
|
|
12
|
-
this.mount = (key, children) => {
|
|
13
|
-
this.setState((state) => ({
|
|
14
|
-
portals: [...state.portals, { key, children }],
|
|
15
|
-
}));
|
|
16
|
-
};
|
|
17
|
-
this.update = (key, children) => this.setState((state) => ({
|
|
18
|
-
portals: state.portals.map((item) => {
|
|
19
|
-
if (item.key === key) {
|
|
20
|
-
return { ...item, children };
|
|
21
|
-
}
|
|
22
|
-
return item;
|
|
23
|
-
}),
|
|
24
|
-
}));
|
|
25
|
-
this.unmount = (key) => this.setState((state) => ({
|
|
26
|
-
portals: state.portals.filter((item) => item.key !== key),
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
return this.state.portals.map(({ key, children }) => (React.createElement(View, { key: key, collapsable: false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */, pointerEvents: "box-none", style: StyleSheet.absoluteFill }, children)));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=PortalManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PortalManager.js","sourceRoot":"","sources":["PortalManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAShD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK,CAAC,aAAwB;IAAzE;;QACE,UAAK,GAAU;YACb,OAAO,EAAE,EAAE;SACZ,CAAC;QAEF,UAAK,GAAG,CAAC,GAAW,EAAE,QAAyB,EAAE,EAAE;YACjD,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBACxB,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;aAC/C,CAAC,CAAC,CAAC;QACN,CAAC,CAAC;QAEF,WAAM,GAAG,CAAC,GAAW,EAAE,QAAyB,EAAE,EAAE,CAClD,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACxB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBAClC,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,EAAE;oBACpB,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAC;iBAC9B;gBACD,OAAO,IAAI,CAAC;YACd,CAAC,CAAC;SACH,CAAC,CAAC,CAAC;QAEN,YAAO,GAAG,CAAC,GAAW,EAAE,EAAE,CACxB,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACxB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC;SAC1D,CAAC,CAAC,CAAC;IAgBR,CAAC;IAdC,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACnD,oBAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,WAAW,EACT,KAAK,CAAC,wGAAwG,EAEhH,aAAa,EAAC,UAAU,EACxB,KAAK,EAAE,UAAU,CAAC,YAAY,IAE7B,QAAQ,CACJ,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Pressable as NativePressable, } from "react-native";
|
|
3
|
-
export default function Pressable({ children, disabled, onPress, activeOpacity = 0.8, disabledOpacity = 0.8, delayLongPress, hitSlop, style, ...props }) {
|
|
4
|
-
return (React.createElement(NativePressable, { onPress: onPress, disabled: disabled, delayLongPress: delayLongPress ? delayLongPress : 500, hitSlop: hitSlop ? hitSlop : 8, style: ({ pressed }) => {
|
|
5
|
-
return [
|
|
6
|
-
{
|
|
7
|
-
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
|
|
8
|
-
},
|
|
9
|
-
style,
|
|
10
|
-
];
|
|
11
|
-
}, ...props }, children));
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=Pressable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,SAAS,IAAI,eAAe,GAG7B,MAAM,cAAc,CAAC;AAQtB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,GAAG,GAAG,EACnB,eAAe,GAAG,GAAG,EACrB,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACF;IACN,OAAO,CACL,oBAAC,eAAe,IACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,EACrD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAC9B,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;YACrB,OAAO;gBACL;oBACE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;iBAClE;gBACD,KAAK;aACN,CAAC;QACJ,CAAC,KACG,KAAK,IAER,QAAQ,CACO,CACnB,CAAC;AACJ,CAAC"}
|