@draftbit/core 54.0.3 → 54.0.4-6c949a.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/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -4
- package/src/Provider.js +0 -10
- package/src/Provider.js.map +0 -1
- package/src/components/AccordionGroup.js +0 -51
- 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 -76
- package/src/components/BottomSheet/BottomSheet.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 -119
- 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 -79
- 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 -418
- package/src/components/DatePicker/DatePicker.js.map +0 -1
- package/src/components/DatePicker/DatePickerComponent.js +0 -17
- package/src/components/DatePicker/DatePickerComponent.js.map +0 -1
- package/src/components/DatePicker/DatePickerComponent.web.js +0 -57
- 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/DatePicker/parseDate.js +0 -12
- package/src/components/DatePicker/parseDate.js.map +0 -1
- package/src/components/DeckSwiper/DeckSwiper.js +0 -116
- 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 -20
- package/src/components/Elevation.js.map +0 -1
- package/src/components/ExpoImage.js +0 -44
- package/src/components/ExpoImage.js.map +0 -1
- package/src/components/FlatList.js +0 -7
- package/src/components/FlatList.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/KeyboardAvoidingView.js +0 -29
- package/src/components/KeyboardAvoidingView.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 -58
- 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/LoadingIndicator.js +0 -38
- package/src/components/LoadingIndicator.js.map +0 -1
- package/src/components/LottieAnimation.js +0 -12
- package/src/components/LottieAnimation.js.map +0 -1
- package/src/components/Markdown.js +0 -33
- 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 -123
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +0 -90
- package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/index.js +0 -13
- 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 -71
- package/src/components/MediaPlayer/MediaPlayerCommon.js.map +0 -1
- package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +0 -109
- 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 -63
- package/src/components/NumberInput.js.map +0 -1
- package/src/components/Picker/NativePicker.ios.js +0 -77
- package/src/components/Picker/NativePicker.ios.js.map +0 -1
- package/src/components/Picker/NativePicker.js +0 -73
- package/src/components/Picker/NativePicker.js.map +0 -1
- package/src/components/Picker/PickerCommon.js +0 -36
- package/src/components/Picker/PickerCommon.js.map +0 -1
- package/src/components/Picker/PickerInputContainer.js +0 -36
- package/src/components/Picker/PickerInputContainer.js.map +0 -1
- package/src/components/Picker/dropdown/DropDownModalPicker.js +0 -70
- package/src/components/Picker/dropdown/DropDownModalPicker.js.map +0 -1
- package/src/components/Picker/dropdown/DropDownPicker.js +0 -61
- package/src/components/Picker/dropdown/DropDownPicker.js.map +0 -1
- package/src/components/Picker/dropdown/MultiSelectPicker.js +0 -9
- package/src/components/Picker/dropdown/MultiSelectPicker.js.map +0 -1
- package/src/components/Picker/dropdown/PickerItem.js +0 -9
- package/src/components/Picker/dropdown/PickerItem.js.map +0 -1
- package/src/components/Picker/index.js +0 -22
- package/src/components/Picker/index.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 -89
- 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 -34
- 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 -109
- 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 -23
- 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 -57
- 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 -79
- 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 -8
- package/src/components/SVG.js.map +0 -1
- package/src/components/SVG.native.js +0 -10
- package/src/components/SVG.native.js.map +0 -1
- package/src/components/ScreenContainer.js +0 -42
- 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 -111
- 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/SimpleStyleScrollables/SimpleStyleFlashList.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +0 -15
- package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +0 -15
- package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +0 -91
- package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +0 -1
- package/src/components/Slider.js +0 -84
- 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 -43
- package/src/components/Stepper.js.map +0 -1
- package/src/components/Surface.js +0 -55
- package/src/components/Surface.js.map +0 -1
- package/src/components/SwipeableItem/SwipeableItem.js +0 -124
- 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 -99
- 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 -56
- package/src/components/Switch.js.map +0 -1
- package/src/components/TabView/TabView.js +0 -65
- 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 -42
- 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 -25
- package/src/components/Text.js.map +0 -1
- package/src/components/TextField.js +0 -411
- package/src/components/TextField.js.map +0 -1
- package/src/components/TextInput.js +0 -25
- package/src/components/TextInput.js.map +0 -1
- package/src/components/Timer.js +0 -87
- package/src/components/Timer.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 -36
- 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/AvoidKeyboardView.js +0 -36
- package/src/deprecated-components/AvoidKeyboardView.js.map +0 -1
- package/src/deprecated-components/Banner.js +0 -112
- 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 -46
- 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 -111
- 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 -35
- package/src/hooks.js.map +0 -1
- package/src/index.js +0 -77
- package/src/index.js.map +0 -1
- package/src/interfaces/Icon.js +0 -9
- package/src/interfaces/Icon.js.map +0 -1
- package/src/utilities.js +0 -223
- package/src/utilities.js.map +0 -1
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
import { Svg, Path, G } from "react-native-svg";
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated DEPRECATED
|
|
6
|
-
*/
|
|
7
|
-
class CircularProgress extends React.Component {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
|
|
11
|
-
const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;
|
|
12
|
-
return {
|
|
13
|
-
x: centerX + radius * Math.cos(angleInRadians),
|
|
14
|
-
y: centerY + radius * Math.sin(angleInRadians),
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
this.circlePath = (x, y, radius, startAngle, endAngle) => {
|
|
18
|
-
const start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);
|
|
19
|
-
const end = this.polarToCartesian(x, y, radius, startAngle);
|
|
20
|
-
const largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
|
|
21
|
-
const d = [
|
|
22
|
-
"M",
|
|
23
|
-
start.x,
|
|
24
|
-
start.y,
|
|
25
|
-
"A",
|
|
26
|
-
radius,
|
|
27
|
-
radius,
|
|
28
|
-
0,
|
|
29
|
-
largeArcFlag,
|
|
30
|
-
0,
|
|
31
|
-
end.x,
|
|
32
|
-
end.y,
|
|
33
|
-
];
|
|
34
|
-
return d.join(" ");
|
|
35
|
-
};
|
|
36
|
-
this.clampFill = (fill) => Math.min(100, Math.max(0, fill));
|
|
37
|
-
}
|
|
38
|
-
render() {
|
|
39
|
-
const { size, width, backgroundWidth, tintColor = "black", tintTransparency = true, backgroundColor, style, rotation = 90, lineCap = "butt", arcSweepAngle = 360, fill, children, childrenContainerStyle, padding = 0, renderCap, dashedBackground = { width: 0, gap: 0 }, dashedTint = { width: 0, gap: 0 }, } = this.props;
|
|
40
|
-
const maxWidthCircle = backgroundWidth
|
|
41
|
-
? Math.max(width, backgroundWidth)
|
|
42
|
-
: width;
|
|
43
|
-
const sizeWithPadding = size / 2 + padding / 2;
|
|
44
|
-
const radius = size / 2 - maxWidthCircle / 2 - padding / 2;
|
|
45
|
-
const currentFillAngle = (arcSweepAngle * this.clampFill(fill)) / 100;
|
|
46
|
-
const backgroundPath = this.circlePath(sizeWithPadding, sizeWithPadding, radius, tintTransparency ? 0 : currentFillAngle, arcSweepAngle);
|
|
47
|
-
const circlePathItem = this.circlePath(sizeWithPadding, sizeWithPadding, radius, 0, currentFillAngle);
|
|
48
|
-
const coordinate = this.polarToCartesian(sizeWithPadding, sizeWithPadding, radius, currentFillAngle);
|
|
49
|
-
const cap = renderCap ? renderCap({ center: coordinate }) : null;
|
|
50
|
-
const offset = size - maxWidthCircle * 2;
|
|
51
|
-
const localChildrenContainerStyle = [
|
|
52
|
-
{
|
|
53
|
-
position: "absolute",
|
|
54
|
-
left: maxWidthCircle + padding / 2,
|
|
55
|
-
top: maxWidthCircle + padding / 2,
|
|
56
|
-
width: offset,
|
|
57
|
-
height: offset,
|
|
58
|
-
borderRadius: offset / 2,
|
|
59
|
-
alignItems: "center",
|
|
60
|
-
justifyContent: "center",
|
|
61
|
-
overflow: "hidden",
|
|
62
|
-
},
|
|
63
|
-
childrenContainerStyle,
|
|
64
|
-
];
|
|
65
|
-
const strokeDasharrayTint = dashedTint.gap > 0
|
|
66
|
-
? Object.values(dashedTint)
|
|
67
|
-
.map((value) => value.toString())
|
|
68
|
-
.join(" ")
|
|
69
|
-
: "";
|
|
70
|
-
const strokeDasharrayBackground = dashedBackground.gap > 0
|
|
71
|
-
? Object.values(dashedBackground)
|
|
72
|
-
.map((value) => value.toString())
|
|
73
|
-
.join(" ")
|
|
74
|
-
: "";
|
|
75
|
-
return (React.createElement(View, { style: style },
|
|
76
|
-
React.createElement(Svg, { width: size + padding, height: size + padding },
|
|
77
|
-
React.createElement(G, { rotation: rotation, originX: (size + padding) / 2, originY: (size + padding) / 2 },
|
|
78
|
-
backgroundColor && (React.createElement(Path, { d: backgroundPath, stroke: backgroundColor, strokeWidth: backgroundWidth || width, strokeLinecap: lineCap, strokeDasharray: strokeDasharrayBackground, fill: "transparent" })),
|
|
79
|
-
fill > 0 && (React.createElement(Path, { d: circlePathItem, stroke: tintColor, strokeWidth: width, strokeLinecap: lineCap, strokeDasharray: strokeDasharrayTint, fill: "transparent" })),
|
|
80
|
-
cap)),
|
|
81
|
-
children && (React.createElement(View, { style: localChildrenContainerStyle }, children(fill)))));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
export default CircularProgress;
|
|
85
|
-
//# sourceMappingURL=CircularProgress.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CircularProgress.js","sourceRoot":"","sources":["CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAw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AE,CAAC;QAET,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK;YAChB,oBAAC,GAAG,IAAC,KAAK,EAAE,IAAI,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO;gBAEhD,oBAAC,CAAC,IACA,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,EAC7B,OAAO,EAAE,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC;oBAE5B,eAAe,IAAI,CAClB,oBAAC,IAAI,IACH,CAAC,EAAE,cAAc,EACjB,MAAM,EAAE,eAAe,EACvB,WAAW,EAAE,eAAe,IAAI,KAAK,EACrC,aAAa,EAAE,OAAO,EACtB,eAAe,EAAE,yBAAyB,EAC1C,IAAI,EAAC,aAAa,GAClB,CACH;oBACA,IAAI,GAAG,CAAC,IAAI,CACX,oBAAC,IAAI,IACH,CAAC,EAAE,cAAc,EACjB,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,KAAK,EAClB,aAAa,EAAE,OAAO,EACtB,eAAe,EAAE,mBAAmB,EACpC,IAAI,EAAC,aAAa,GAClB,CACH;oBACA,GAAG,CACF,CACA;YACL,QAAQ,IAAI,CACX,oBAAC,IAAI,IAAC,KAAK,EAAE,2BAA2B,IAAG,QAAQ,CAAC,IAAI,CAAC,CAAQ,CAClE,CACI,CACR,CAAC;IACJ,CAAC;CACF;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, ImageBackground, StyleSheet, } from "react-native";
|
|
3
|
-
import { withTheme } from "@draftbit/theme";
|
|
4
|
-
import Elevation from "../components/Elevation";
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated DEPRECATED
|
|
7
|
-
*/
|
|
8
|
-
const Container = ({ useThemeGutterPadding, borderColor, borderWidth, backgroundColor, backgroundImage, backgroundImageResizeMode, elevation, style, children, theme, ...rest }) => {
|
|
9
|
-
const { flex, flexGrow, flexWrap, flexBasis, flexShrink, flexDirection, alignContent, justifyContent, alignItems, padding, paddingTop, paddingBottom, paddingLeft, paddingRight, paddingVertical, paddingHorizontal, ...styleProp } = StyleSheet.flatten(style) || {};
|
|
10
|
-
const containerStyle = {
|
|
11
|
-
backgroundColor,
|
|
12
|
-
borderColor,
|
|
13
|
-
borderWidth,
|
|
14
|
-
width: "100%",
|
|
15
|
-
...styleProp,
|
|
16
|
-
};
|
|
17
|
-
const innerStyle = {
|
|
18
|
-
flex,
|
|
19
|
-
flexGrow,
|
|
20
|
-
flexWrap,
|
|
21
|
-
flexBasis,
|
|
22
|
-
flexShrink,
|
|
23
|
-
flexDirection,
|
|
24
|
-
alignContent,
|
|
25
|
-
justifyContent,
|
|
26
|
-
alignItems,
|
|
27
|
-
padding,
|
|
28
|
-
paddingTop,
|
|
29
|
-
paddingBottom,
|
|
30
|
-
paddingLeft,
|
|
31
|
-
paddingRight,
|
|
32
|
-
paddingVertical,
|
|
33
|
-
paddingHorizontal: paddingHorizontal || useThemeGutterPadding ? 16 : 0,
|
|
34
|
-
};
|
|
35
|
-
const Wrap = elevation ? Elevation : View;
|
|
36
|
-
if (elevation)
|
|
37
|
-
containerStyle.elevation = elevation;
|
|
38
|
-
return (React.createElement(Wrap, { style: [containerStyle, style], ...rest }, backgroundImage ? (React.createElement(ImageBackground, { source: typeof backgroundImage === "string"
|
|
39
|
-
? { uri: backgroundImage }
|
|
40
|
-
: backgroundImage, resizeMode: backgroundImageResizeMode, style: {
|
|
41
|
-
flex: 1,
|
|
42
|
-
} },
|
|
43
|
-
React.createElement(View, { style: innerStyle }, children))) : (React.createElement(View, { style: innerStyle }, children))));
|
|
44
|
-
};
|
|
45
|
-
export default withTheme(Container);
|
|
46
|
-
//# sourceMappingURL=Container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["Container.tsx"],"names":[],"mappings":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AC;IAEpD,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,cAAc,EAAE,KAAK,CAAC,KAAM,IAAI,IAC3C,eAAe,CAAC,CAAC,CAAC,CACjB,oBAAC,eAAe,IACd,MAAM,EACJ,OAAO,eAAe,KAAK,QAAQ;YACjC,CAAC,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE;YAC1B,CAAC,CAAC,eAAe,EAErB,UAAU,EAAE,yBAAyB,EACrC,KAAK,EAAE;YACL,IAAI,EAAE,CAAC;SACR;QAED,oBAAC,IAAI,IAAC,KAAK,EAAE,UAAU,IAAG,QAAQ,CAAQ,CAC1B,CACnB,CAAC,CAAC,CAAC,CACF,oBAAC,IAAI,IAAC,KAAK,EAAE,UAAU,IAAG,QAAQ,CAAQ,CAC3C,CACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ActivityIndicator, View, Text, StyleSheet, Pressable, } from "react-native";
|
|
3
|
-
import color from "color";
|
|
4
|
-
import Config from "../components/Config";
|
|
5
|
-
import Elevation from "../components/Elevation";
|
|
6
|
-
import { withTheme } from "@draftbit/theme";
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated DEPRECATED
|
|
9
|
-
*/
|
|
10
|
-
const Button = ({ Icon, icon, disabled = false, type = "solid", loading = false, labelColor, color: colorOverride, children, onPress, elevation = 0, theme: { colors, typography }, ...rest }) => {
|
|
11
|
-
let backgroundColor, borderColor, textColor, borderWidth;
|
|
12
|
-
const buttonColor = colorOverride || colors.branding.primary;
|
|
13
|
-
if (type === "solid") {
|
|
14
|
-
backgroundColor = buttonColor;
|
|
15
|
-
if (disabled) {
|
|
16
|
-
textColor = color(colors.background.base).alpha(0.5).rgb().string();
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
textColor = labelColor || colors.background.base;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
backgroundColor = "transparent";
|
|
24
|
-
if (disabled) {
|
|
25
|
-
textColor = color(buttonColor).alpha(0.5).rgb().string();
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
textColor = labelColor || buttonColor;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
if (type === "outline") {
|
|
32
|
-
if (disabled) {
|
|
33
|
-
borderColor = color(buttonColor).alpha(0.5).rgb().string();
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
borderColor = buttonColor;
|
|
37
|
-
}
|
|
38
|
-
borderWidth = StyleSheet.hairlineWidth;
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
borderColor = "transparent";
|
|
42
|
-
borderWidth = 0;
|
|
43
|
-
}
|
|
44
|
-
const buttonStyle = {
|
|
45
|
-
backgroundColor,
|
|
46
|
-
borderColor,
|
|
47
|
-
borderWidth,
|
|
48
|
-
borderRadius: 8,
|
|
49
|
-
};
|
|
50
|
-
const textStyle = {
|
|
51
|
-
textAlign: "center",
|
|
52
|
-
color: textColor,
|
|
53
|
-
marginVertical: 16,
|
|
54
|
-
marginHorizontal: 16,
|
|
55
|
-
};
|
|
56
|
-
const iconStyle = [
|
|
57
|
-
styles.icon,
|
|
58
|
-
{
|
|
59
|
-
marginLeft: 16,
|
|
60
|
-
marginRight: -8,
|
|
61
|
-
width: Config.buttonIconSize,
|
|
62
|
-
},
|
|
63
|
-
];
|
|
64
|
-
return (React.createElement(Elevation, { style: { elevation, alignSelf: "stretch" } },
|
|
65
|
-
React.createElement(Pressable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: "button", disabled: disabled || loading, style: [styles.button, buttonStyle] },
|
|
66
|
-
React.createElement(View, { style: styles.content },
|
|
67
|
-
icon && loading !== true ? (React.createElement(View, { style: iconStyle },
|
|
68
|
-
React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,
|
|
69
|
-
loading ? (React.createElement(ActivityIndicator, { size: "small", color: textColor, style: iconStyle })) : null,
|
|
70
|
-
React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, children)))));
|
|
71
|
-
};
|
|
72
|
-
const styles = StyleSheet.create({
|
|
73
|
-
button: {
|
|
74
|
-
minWidth: 64,
|
|
75
|
-
borderStyle: "solid",
|
|
76
|
-
},
|
|
77
|
-
content: {
|
|
78
|
-
flexDirection: "row",
|
|
79
|
-
alignItems: "center",
|
|
80
|
-
justifyContent: "center",
|
|
81
|
-
},
|
|
82
|
-
icon: {
|
|
83
|
-
width: Config.buttonIconSize,
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
|
-
export default withTheme(Button);
|
|
87
|
-
//# sourceMappingURL=DeprecatedButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeprecatedButton.js","sourceRoot":"","sources":["DeprecatedButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,IAAI,EACJ,IAAI,EACJ,UAAU,EAIV,SAAS,GAEV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAqD5C;;GAEG;AACH,MAAM,MAAM,GAA6C,CAAC,EACxD,IAAI,EACJ,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,IAAI,GAAG,OAAO,EACd,OAAO,GAAG,KAAK,EACf,UAAU,EACV,KAAK,EAAE,aAAa,EACpB,QAAQ,EACR,OAAO,EACP,SAAS,GAAG,CAAC,EACb,KAAK,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAC7B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,IAAI,eAAe,EAAE,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,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,QAAQ,EAAE,EAAE;QACZ,WAAW,EAAE,OAAO;KACrB;IACD,OAAO,EAAE;QACP,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC,cAAc;KAC7B;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { withTheme } from "@draftbit/theme";
|
|
3
|
-
import Touchable from "../components/Touchable";
|
|
4
|
-
const getWidth = (numColumns) => {
|
|
5
|
-
switch (numColumns) {
|
|
6
|
-
case 1:
|
|
7
|
-
return "33%";
|
|
8
|
-
case 2:
|
|
9
|
-
return "50%";
|
|
10
|
-
default:
|
|
11
|
-
return "100%";
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated DEPRECATED
|
|
16
|
-
*/
|
|
17
|
-
const Card = ({ numColumns = 3, children, onPress, style, ...rest }) => {
|
|
18
|
-
const width = getWidth(numColumns);
|
|
19
|
-
return (React.createElement(Touchable, { disabled: !onPress, onPress: onPress, style: [style, { width }], ...rest }, children));
|
|
20
|
-
};
|
|
21
|
-
export default withTheme(Card);
|
|
22
|
-
//# sourceMappingURL=DeprecatedCardWrapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeprecatedCardWrapper.js","sourceRoot":"","sources":["DeprecatedCardWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAYhD,MAAM,QAAQ,GAAG,CAAC,UAAkB,EAAE,EAAE;IACtC,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,CAAC;YACJ,OAAO,KAAK,CAAC;QACf,KAAK,CAAC;YACJ,OAAO,KAAK,CAAC;QACf;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,IAAI,GAA6C,CAAC,EACtD,UAAU,GAAG,CAAC,EACd,QAAQ,EACR,OAAO,EACP,KAAK,EACL,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACnC,OAAO,CACL,oBAAC,SAAS,IACR,QAAQ,EAAE,CAAC,OAAO,EAClB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,KACrB,IAAI,IAEP,QAAQ,CACC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ActivityIndicator, View, StyleSheet, Pressable, } from "react-native";
|
|
3
|
-
import color from "color";
|
|
4
|
-
import Config from "../components/Config";
|
|
5
|
-
import Text from "../components/Text";
|
|
6
|
-
import Elevation from "../components/Elevation";
|
|
7
|
-
import { withTheme } from "@draftbit/theme";
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated DEPRECATED
|
|
10
|
-
*/
|
|
11
|
-
const FAB = ({ Icon, icon, disabled = false, type = "solid", loading = false, color: colorOverride, label, onPress, elevation = 0, style, theme: { colors, typography }, ...rest }) => {
|
|
12
|
-
let backgroundColor, borderColor, textColor, borderWidth;
|
|
13
|
-
const buttonColor = colorOverride || colors.branding.primary;
|
|
14
|
-
if (type === "standard" || type === "extended" || type === "fixed") {
|
|
15
|
-
backgroundColor = buttonColor;
|
|
16
|
-
if (disabled) {
|
|
17
|
-
textColor = color(colors.background.base).alpha(0.5).rgb().string();
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
textColor = colors.background.base;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
backgroundColor = "transparent";
|
|
25
|
-
if (disabled) {
|
|
26
|
-
textColor = color(buttonColor).alpha(0.5).rgb().string();
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
textColor = buttonColor;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (type === "outline") {
|
|
33
|
-
if (disabled) {
|
|
34
|
-
borderColor = color(buttonColor).alpha(0.5).rgb().string();
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
borderColor = buttonColor;
|
|
38
|
-
}
|
|
39
|
-
borderWidth = StyleSheet.hairlineWidth;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
borderColor = "transparent";
|
|
43
|
-
borderWidth = 0;
|
|
44
|
-
}
|
|
45
|
-
const buttonStyle = {
|
|
46
|
-
backgroundColor,
|
|
47
|
-
borderColor,
|
|
48
|
-
borderWidth,
|
|
49
|
-
borderRadius: 8,
|
|
50
|
-
alignItems: "center",
|
|
51
|
-
justifyContent: "center",
|
|
52
|
-
};
|
|
53
|
-
const buttonStyles = [styles.button, buttonStyle];
|
|
54
|
-
const contentStyle = [styles.content];
|
|
55
|
-
const textStyle = {
|
|
56
|
-
textAlign: "center",
|
|
57
|
-
color: textColor,
|
|
58
|
-
};
|
|
59
|
-
const iconStyle = [
|
|
60
|
-
styles.icon,
|
|
61
|
-
{
|
|
62
|
-
width: Config.buttonIconSize,
|
|
63
|
-
},
|
|
64
|
-
];
|
|
65
|
-
if (type === "standard" || type === "outline") {
|
|
66
|
-
buttonStyle.width = Config.FABSize;
|
|
67
|
-
buttonStyle.height = Config.FABSize;
|
|
68
|
-
buttonStyle.borderRadius = Config.FABBorderRadius;
|
|
69
|
-
contentStyle.push({
|
|
70
|
-
width: Config.FABSize,
|
|
71
|
-
height: Config.FABSize,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (type === "extended" || type === "fixed") {
|
|
75
|
-
iconStyle.push({
|
|
76
|
-
marginLeft: 16,
|
|
77
|
-
marginRight: -8,
|
|
78
|
-
});
|
|
79
|
-
textStyle.margin = 16;
|
|
80
|
-
}
|
|
81
|
-
if (type === "fixed") {
|
|
82
|
-
buttonStyles.push({
|
|
83
|
-
height: Config.FABFixedHeight,
|
|
84
|
-
alignSelf: "stretch",
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
return (React.createElement(Elevation, { style: [{ elevation }, style] },
|
|
88
|
-
React.createElement(Pressable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: "button", disabled: disabled || loading, style: buttonStyles },
|
|
89
|
-
React.createElement(View, { style: styles.content },
|
|
90
|
-
icon && loading !== true ? (React.createElement(View, { style: iconStyle },
|
|
91
|
-
React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,
|
|
92
|
-
loading ? (React.createElement(ActivityIndicator, { size: "small", color: textColor, style: iconStyle })) : null,
|
|
93
|
-
label ? (React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, label)) : null))));
|
|
94
|
-
};
|
|
95
|
-
const styles = StyleSheet.create({
|
|
96
|
-
button: {
|
|
97
|
-
borderStyle: "solid",
|
|
98
|
-
},
|
|
99
|
-
content: {
|
|
100
|
-
flexDirection: "row",
|
|
101
|
-
alignItems: "center",
|
|
102
|
-
justifyContent: "center",
|
|
103
|
-
},
|
|
104
|
-
icon: {
|
|
105
|
-
alignItems: "center",
|
|
106
|
-
justifyContent: "center",
|
|
107
|
-
width: Config.buttonIconSize,
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
export default withTheme(FAB);
|
|
111
|
-
//# sourceMappingURL=DeprecatedFAB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeprecatedFAB.js","sourceRoot":"","sources":["DeprecatedFAB.tsx"],"names":[],"mappings":"AAAA,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S,EAChB,KAAK,EAAE,SAAS,GAChB,CACH,CAAC,CAAC,CAAC,IAAI;gBACP,KAAK,CAAC,CAAC,CAAC,CACP,oBAAC,IAAI,IAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,IAC1D,KAAK,CACD,CACR,CAAC,CAAC,CAAC,IAAI,CACH,CACG,CACF,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,WAAW,EAAE,OAAO;KACrB;IACD,OAAO,EAAE;QACP,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,KAAK,EAAE,MAAM,CAAC,cAAc;KAC7B;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, StyleSheet, Pressable, ActivityIndicator, Platform, } from "react-native";
|
|
3
|
-
import { withTheme } from "@draftbit/theme";
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated DEPRECATED
|
|
6
|
-
*/
|
|
7
|
-
const FAB = ({ onPress, disabled, loading, iconName = "MaterialIcons/add", style, theme, iconColor, bgColor, size = 50, Icon, ...props }) => {
|
|
8
|
-
const backgroundColor = bgColor || theme.colors.branding.primary;
|
|
9
|
-
const color = iconColor || "#FFF";
|
|
10
|
-
return (React.createElement(View, { style: [
|
|
11
|
-
{
|
|
12
|
-
width: size,
|
|
13
|
-
height: size,
|
|
14
|
-
borderRadius: size / 2,
|
|
15
|
-
overflow: "hidden",
|
|
16
|
-
},
|
|
17
|
-
style,
|
|
18
|
-
] },
|
|
19
|
-
React.createElement(Pressable, { onPress: onPress, disabled: loading || disabled, android_ripple: {
|
|
20
|
-
color: "#333",
|
|
21
|
-
radius: size / 4,
|
|
22
|
-
}, style: ({ pressed }) => {
|
|
23
|
-
return [
|
|
24
|
-
styles.button,
|
|
25
|
-
{
|
|
26
|
-
opacity: pressed || disabled ? 0.75 : 1,
|
|
27
|
-
width: size,
|
|
28
|
-
height: size,
|
|
29
|
-
borderRadius: size / 2,
|
|
30
|
-
backgroundColor,
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
}, ...props },
|
|
34
|
-
React.createElement(View, null, loading ? (React.createElement(ActivityIndicator, { style: size > 50 ? { marginTop: 2, marginLeft: 2 } : undefined, size: size <= 50 ? "small" : "large", color: color })) : (React.createElement(Icon, { name: iconName, size: size, color: color }))))));
|
|
35
|
-
};
|
|
36
|
-
const styles = StyleSheet.create({
|
|
37
|
-
button: {
|
|
38
|
-
backgroundColor: "#5a45ff",
|
|
39
|
-
justifyContent: "center",
|
|
40
|
-
alignItems: "center",
|
|
41
|
-
...Platform.select({
|
|
42
|
-
web: {
|
|
43
|
-
cursor: "pointer",
|
|
44
|
-
userSelect: "none",
|
|
45
|
-
},
|
|
46
|
-
}),
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
export default withTheme(FAB);
|
|
50
|
-
//# sourceMappingURL=FAB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FAB.js","sourceRoot":"","sources":["FAB.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,iBAAiB,EAIjB,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAiB5C;;GAEG;AACH,MAAM,GAAG,GAA6C,CAAC,EACrD,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,GAAG,mBAAmB,EAC9B,KAAK,EACL,KAAK,EACL,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ACF,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,CACnD,CACI,CACG,CACP,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,MAAM,EAAE;QACN,eAAe,EAAE,SAAS;QAC1B,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,GAAG,QAAQ,CAAC,MAAM,CAAC;YACjB,GAAG,EAAE;gBACH,MAAM,EAAE,SAAS;gBACjB,UAAU,EAAE,MAAM;aACnB;SACF,CAAC;KACH;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, TextInput, StyleSheet, } from "react-native";
|
|
3
|
-
import { withTheme } from "@draftbit/theme";
|
|
4
|
-
import Config from "../components/Config";
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated DEPRECATED
|
|
7
|
-
*/
|
|
8
|
-
const FieldSearchBarFull = ({ showIcon, Icon, icon = "search", placeholder = "", style, theme: { colors, typography }, onChange: changeOverride, onSubmit: submitOverride, value, defaultValue, }) => {
|
|
9
|
-
const [focused, setIsFocused] = React.useState(false);
|
|
10
|
-
const onBlur = () => {
|
|
11
|
-
setIsFocused(false);
|
|
12
|
-
};
|
|
13
|
-
const [internalValue, setInternalValue] = React.useState(value || defaultValue);
|
|
14
|
-
React.useEffect(() => {
|
|
15
|
-
if (value != null) {
|
|
16
|
-
setInternalValue(value);
|
|
17
|
-
}
|
|
18
|
-
}, [value]);
|
|
19
|
-
React.useEffect(() => {
|
|
20
|
-
if (defaultValue != null) {
|
|
21
|
-
setInternalValue(defaultValue);
|
|
22
|
-
}
|
|
23
|
-
}, [defaultValue]);
|
|
24
|
-
const onChange = React.useCallback((text) => {
|
|
25
|
-
changeOverride && changeOverride(text);
|
|
26
|
-
}, [changeOverride]);
|
|
27
|
-
const onFocus = () => {
|
|
28
|
-
setIsFocused(true);
|
|
29
|
-
};
|
|
30
|
-
const onSubmit = (e) => {
|
|
31
|
-
submitOverride && submitOverride(e);
|
|
32
|
-
};
|
|
33
|
-
const { lineHeight, ...typeStyles } = typography.body2;
|
|
34
|
-
const handleChangeText = (newValue) => {
|
|
35
|
-
setInternalValue(newValue);
|
|
36
|
-
if (onChange) {
|
|
37
|
-
onChange(newValue);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
return (React.createElement(View, { style: [styles.container, style] },
|
|
41
|
-
showIcon && (React.createElement(Icon, { name: icon, size: Config.fieldSearchBarFullIconSize, color: focused ? colors.branding.primary : colors.foreground.base })),
|
|
42
|
-
React.createElement(View, { style: { marginLeft: showIcon ? 12 : 0, flex: 1 } },
|
|
43
|
-
React.createElement(TextInput, { clearButtonMode: "while-editing", placeholder: placeholder, value: internalValue, onBlur: onBlur, onFocus: onFocus, onChangeText: handleChangeText, onSubmitEditing: onSubmit, placeholderTextColor: colors.foreground.base, style: [
|
|
44
|
-
{
|
|
45
|
-
color: colors.text.medium,
|
|
46
|
-
},
|
|
47
|
-
typeStyles,
|
|
48
|
-
] }))));
|
|
49
|
-
};
|
|
50
|
-
const styles = StyleSheet.create({
|
|
51
|
-
container: {
|
|
52
|
-
flexDirection: "row",
|
|
53
|
-
alignItems: "center",
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
export default withTheme(FieldSearchBarFull);
|
|
57
|
-
//# sourceMappingURL=FieldSearchBarFull.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FieldSearchBarFull.js","sourceRoot":"","sources":["FieldSearchBarFull.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,SAAS,EACT,UAAU,GAKX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAA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J,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated DEPRECATED
|
|
5
|
-
*/
|
|
6
|
-
export function Center({ width = 240, height = 200, children, bgColor, style, ...rest }) {
|
|
7
|
-
return (React.createElement(View, { style: [
|
|
8
|
-
{
|
|
9
|
-
justifyContent: "center",
|
|
10
|
-
alignItems: "center",
|
|
11
|
-
width,
|
|
12
|
-
height,
|
|
13
|
-
backgroundColor: bgColor,
|
|
14
|
-
},
|
|
15
|
-
style,
|
|
16
|
-
], ...rest }, children));
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated DEPRECATED
|
|
20
|
-
*/
|
|
21
|
-
export function Circle({ size = 50, bgColor, children, style, ...rest }) {
|
|
22
|
-
const borderRadius = 1000;
|
|
23
|
-
return (React.createElement(Center, { width: size, height: size, bgColor: bgColor, style: [
|
|
24
|
-
style,
|
|
25
|
-
{ backgroundColor: bgColor, borderRadius, overflow: "hidden" },
|
|
26
|
-
], ...rest }, children));
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated DEPRECATED
|
|
30
|
-
*/
|
|
31
|
-
export function Square({ size = 50, bgColor, children, style, ...rest }) {
|
|
32
|
-
return (React.createElement(Center, { style: style, width: size, height: size, bgColor: bgColor, ...rest }, children));
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated DEPRECATED
|
|
36
|
-
*/
|
|
37
|
-
export function Row({ justifyContent, alignItems, children, style, ...rest }) {
|
|
38
|
-
return (React.createElement(View, { style: [
|
|
39
|
-
style, // style goes first b/c we can't override these
|
|
40
|
-
{
|
|
41
|
-
alignItems,
|
|
42
|
-
flexDirection: "row",
|
|
43
|
-
justifyContent: justifyContent,
|
|
44
|
-
},
|
|
45
|
-
], ...rest }, children));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated DEPRECATED
|
|
49
|
-
*/
|
|
50
|
-
export function Spacer({ top = 8, right = 8, bottom = 8, left = 8, children, style, ...rest }) {
|
|
51
|
-
return (React.createElement(View, { style: [
|
|
52
|
-
style,
|
|
53
|
-
{
|
|
54
|
-
paddingRight: right,
|
|
55
|
-
paddingTop: top,
|
|
56
|
-
paddingLeft: left,
|
|
57
|
-
paddingBottom: bottom,
|
|
58
|
-
},
|
|
59
|
-
], ...rest }, children));
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated DEPRECATED
|
|
63
|
-
*/
|
|
64
|
-
export function Stack({ children, justifyContent = "flex-start", alignItems = "flex-start", style, ...rest }) {
|
|
65
|
-
return (
|
|
66
|
-
// style must go first since we don't want justifyContent, alignItems overridden
|
|
67
|
-
React.createElement(View, { style: [style, { justifyContent, alignItems }], ...rest }, children));
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=Layout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAI1D;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,KAAK,GAAG,GAAG,EACX,MAAM,GAAG,GAAG,EACZ,QAAQ,EACR,OAAO,EACP,KAAK,EACL,GAAG,IAAI,EAOR;IACC,OAAO,CACL,oBAAC,IAAI,IACH,KAAK,EAAE;YACL;gBACE,cAAc,EAAE,QAAQ;gBACxB,UAAU,EAAE,QAAQ;gBACpB,KAAK;gBACL,MAA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