├── .editorconfig ├── .gitattributes ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .husky ├── .gitignore └── pre-commit ├── .nvmrc ├── .prettierignore ├── .prettierrc.js ├── .watchmanconfig ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── commitlint.config.js ├── deprecated-packages └── web-maps │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── src │ ├── components │ │ ├── MapCallout.tsx │ │ ├── MapMarker.tsx │ │ ├── MapScriptLoader.tsx │ │ ├── MapView.tsx │ │ ├── NoApiKey.tsx │ │ └── ReactGoogleMaps.tsx │ ├── index.tsx │ └── mapTypes.tsx │ └── tsconfig.json ├── eslint.config.js ├── example ├── .editorconfig ├── .gitattributes ├── .gitignore ├── app.json ├── babel.config.js ├── index.js ├── metro.config.js ├── package.json ├── src │ ├── AccordionExample.jsx │ ├── ActionSheetExample.jsx │ ├── App.tsx │ ├── AudioPlayerExample.tsx │ ├── BottomSheetExample.tsx │ ├── ButtonExample.jsx │ ├── CheckboxExample.jsx │ ├── CircularProgressExample.tsx │ ├── DatePickerExample.jsx │ ├── DeckSwiperExample.tsx │ ├── ExpoImageExample.tsx │ ├── IconExample.jsx │ ├── KeyboardAvoidingViewExample.tsx │ ├── LayoutExample.tsx │ ├── LinearGradientExample.jsx │ ├── LinearProgressExample.tsx │ ├── LoadingIndicatorExample.tsx │ ├── LottieAnimationExample.tsx │ ├── MapViewDataDrivenExample.jsx │ ├── MapViewExample.jsx │ ├── MarkdownExample.tsx │ ├── NumberInputExample.jsx │ ├── PickerExample.tsx │ ├── PinInputExample.tsx │ ├── RadioButtonExample.jsx │ ├── SVGExample.jsx │ ├── Section.jsx │ ├── SectionListExample.tsx │ ├── ShadowExample.tsx │ ├── SliderExample.tsx │ ├── StarRatingExample.jsx │ ├── StepperExample.jsx │ ├── SurfaceExample.jsx │ ├── SwipeableItemExample.tsx │ ├── SwiperExample.tsx │ ├── SwitchExample.jsx │ ├── TabViewExample.tsx │ ├── TableExample.tsx │ ├── TextFieldExample.jsx │ ├── TextInputExample.jsx │ ├── ThemeExample.tsx │ ├── TimerExample.tsx │ ├── VideoPlayerExample.tsx │ ├── WebViewExample.jsx │ ├── YoutubeExample.tsx │ └── assets │ │ ├── fonts │ │ ├── FiraCode-Bold.otf │ │ └── Sriracha-Regular.ttf │ │ ├── images │ │ ├── example.svg │ │ ├── hamburger.png │ │ ├── icon.png │ │ ├── splash.png │ │ └── theme.png │ │ ├── loop.wav │ │ └── lottie_animation_example.json └── tsconfig.json ├── glyphmaps ├── AntDesign.json ├── Entypo.json ├── EvilIcons.json ├── Feather.json ├── FontAwesome.json ├── Foundation.json ├── Ionicons.json ├── MaterialCommunityIcons.json ├── MaterialIcons.json ├── Octicons.json ├── SimpleLineIcons.json └── Zocial.json ├── images └── view-properties-panel.png ├── lerna.json ├── mock-backend.json ├── package.json ├── packages ├── core │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── jest-setup.js │ ├── package.json │ ├── src │ │ ├── Provider.tsx │ │ ├── __tests__ │ │ │ ├── Debouncing.test.tsx │ │ │ ├── FragmentWrapped.test.tsx │ │ │ ├── __mocks__ │ │ │ │ └── mock_food_data.ts │ │ │ ├── components │ │ │ │ ├── AudioPlayer.test.tsx │ │ │ │ ├── CircularProgress.test.tsx │ │ │ │ ├── LinearProgress.test.tsx │ │ │ │ ├── Picker.test.tsx │ │ │ │ ├── PinInput.test.tsx │ │ │ │ ├── SectionList.test.tsx │ │ │ │ └── VideoPlayer.test.tsx │ │ │ └── declarations.d.ts │ │ ├── assets │ │ │ ├── bg.png │ │ │ ├── icon.png │ │ │ └── warning.png │ │ ├── components │ │ │ ├── AccordionGroup.tsx │ │ │ ├── ActionSheet │ │ │ │ ├── ActionSheet.tsx │ │ │ │ ├── ActionSheetCancel.tsx │ │ │ │ ├── ActionSheetItem.tsx │ │ │ │ └── index.tsx │ │ │ ├── AspectRatio.tsx │ │ │ ├── BottomSheet │ │ │ │ ├── BottomSheet.tsx │ │ │ │ └── index.ts │ │ │ ├── Button.tsx │ │ │ ├── Checkbox │ │ │ │ ├── Checkbox.tsx │ │ │ │ ├── CheckboxGroupRow.tsx │ │ │ │ ├── CheckboxRow.tsx │ │ │ │ ├── context.ts │ │ │ │ └── index.ts │ │ │ ├── Config.ts │ │ │ ├── DatePicker │ │ │ │ ├── DatePicker.tsx │ │ │ │ ├── DatePickerComponent.tsx │ │ │ │ ├── DatePickerComponent.web.tsx │ │ │ │ ├── DatePickerComponentType.ts │ │ │ │ └── parseDate.ts │ │ │ ├── DeckSwiper │ │ │ │ ├── DeckSwiper.tsx │ │ │ │ ├── DeckSwiperCard.tsx │ │ │ │ └── index.tsx │ │ │ ├── Divider.tsx │ │ │ ├── Elevation.tsx │ │ │ ├── ExpoImage.tsx │ │ │ ├── FlatList.tsx │ │ │ ├── FormRow.tsx │ │ │ ├── IconButton.tsx │ │ │ ├── Image.tsx │ │ │ ├── KeyboardAvoidingView.tsx │ │ │ ├── Layout │ │ │ │ ├── AspectRatio.tsx │ │ │ │ ├── Center.tsx │ │ │ │ ├── Circle.tsx │ │ │ │ ├── HStack.tsx │ │ │ │ ├── LayoutCommon.ts │ │ │ │ ├── Spacer.tsx │ │ │ │ ├── Square.tsx │ │ │ │ ├── VStack.tsx │ │ │ │ ├── ZStack.tsx │ │ │ │ └── index.tsx │ │ │ ├── LoadingIndicator.tsx │ │ │ ├── LottieAnimation.tsx │ │ │ ├── Markdown.tsx │ │ │ ├── MediaPlayer │ │ │ │ ├── AudioPlayer │ │ │ │ │ ├── AudioPlayerCommon.ts │ │ │ │ │ ├── AudioPlayerWithInterface.tsx │ │ │ │ │ ├── HeadlessAudioPlayer.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── MediaPlaybackWrapper.tsx │ │ │ │ ├── MediaPlayerCommon.ts │ │ │ │ └── VideoPlayer │ │ │ │ │ ├── VideoPlayer.tsx │ │ │ │ │ └── index.ts │ │ │ ├── NumberInput.tsx │ │ │ ├── Picker │ │ │ │ ├── NativePicker.tsx │ │ │ │ ├── PickerCommon.ts │ │ │ │ ├── PickerInputContainer.tsx │ │ │ │ ├── dropdown │ │ │ │ │ ├── DropDownModalPicker.tsx │ │ │ │ │ ├── DropDownPicker.tsx │ │ │ │ │ ├── MultiSelectPicker.tsx │ │ │ │ │ └── PickerItem.tsx │ │ │ │ └── index.tsx │ │ │ ├── PinInput │ │ │ │ ├── CustomPinInputCell.tsx │ │ │ │ ├── PinInput.tsx │ │ │ │ ├── PinInputText.tsx │ │ │ │ └── index.tsx │ │ │ ├── Portal │ │ │ │ ├── Portal.tsx │ │ │ │ ├── PortalConsumer.tsx │ │ │ │ ├── PortalHost.tsx │ │ │ │ └── PortalManager.tsx │ │ │ ├── Pressable.tsx │ │ │ ├── Progress │ │ │ │ ├── CircularProgress │ │ │ │ │ ├── CircularProgress.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── IndeterminateProgress.tsx │ │ │ │ ├── LinearProgress │ │ │ │ │ ├── LinearProgress.tsx │ │ │ │ │ └── index.tsx │ │ │ │ └── ProgressCommon.ts │ │ │ ├── ProgressIndicator.tsx │ │ │ ├── RadioButton │ │ │ │ ├── RadioButton.tsx │ │ │ │ ├── RadioButtonGroup.tsx │ │ │ │ ├── RadioButtonRow.tsx │ │ │ │ ├── context.tsx │ │ │ │ └── index.tsx │ │ │ ├── Row.tsx │ │ │ ├── SVG.native.tsx │ │ │ ├── SVG.tsx │ │ │ ├── ScreenContainer.tsx │ │ │ ├── SectionList │ │ │ │ ├── SectionHeader.tsx │ │ │ │ ├── SectionList.tsx │ │ │ │ └── index.tsx │ │ │ ├── Shadow.tsx │ │ │ ├── SimpleStyleScrollables │ │ │ │ ├── README.md │ │ │ │ ├── SimpleStyleFlashList.tsx │ │ │ │ ├── SimpleStyleFlatList.tsx │ │ │ │ ├── SimpleStyleKeyboardAwareScrollView.tsx │ │ │ │ ├── SimpleStyleMasonryFlashList.tsx │ │ │ │ ├── SimpleStyleScrollView.tsx │ │ │ │ ├── SimpleStyleSectionList.tsx │ │ │ │ ├── SimpleStyleSwipeableList.tsx │ │ │ │ └── useSplitContentContainerStyles.ts │ │ │ ├── Slider.tsx │ │ │ ├── StarRating.tsx │ │ │ ├── StepIndicator.tsx │ │ │ ├── Stepper.tsx │ │ │ ├── Surface.tsx │ │ │ ├── SwipeableItem │ │ │ │ ├── SwipeableItem.tsx │ │ │ │ ├── SwipeableItemButton.tsx │ │ │ │ ├── SwipeableItemCommon.ts │ │ │ │ ├── SwipeableList.tsx │ │ │ │ └── index.tsx │ │ │ ├── Swiper │ │ │ │ ├── Swiper.tsx │ │ │ │ ├── SwiperItem.tsx │ │ │ │ └── index.tsx │ │ │ ├── Switch.tsx │ │ │ ├── TabView │ │ │ │ ├── TabView.tsx │ │ │ │ ├── TabViewItem.tsx │ │ │ │ └── index.tsx │ │ │ ├── Table │ │ │ │ ├── Table.tsx │ │ │ │ ├── TableCell.tsx │ │ │ │ ├── TableCommon.ts │ │ │ │ ├── TableRow.tsx │ │ │ │ └── index.tsx │ │ │ ├── Text.tsx │ │ │ ├── TextField.tsx │ │ │ ├── TextInput.tsx │ │ │ ├── Timer.tsx │ │ │ ├── Touchable.tsx │ │ │ ├── Touchable.web.tsx │ │ │ ├── Typography.tsx │ │ │ ├── YoutubePlayer │ │ │ │ ├── YoutubePlayer.native.tsx │ │ │ │ ├── YoutubePlayer.tsx │ │ │ │ ├── YoutubePlayerProps.ts │ │ │ │ └── index.ts │ │ │ └── useAuthState.tsx │ │ ├── constants.ts │ │ ├── deprecated-components │ │ │ ├── AccordionItem.tsx │ │ │ ├── AnimatedCircularProgress.tsx │ │ │ ├── AvatarEdit.tsx │ │ │ ├── AvoidKeyboardView.tsx │ │ │ ├── Banner.tsx │ │ │ ├── Card.tsx │ │ │ ├── CheckboxGroup.tsx │ │ │ ├── CircleImage.tsx │ │ │ ├── CircularProgress.tsx │ │ │ ├── Container.tsx │ │ │ ├── DeprecatedButton.tsx │ │ │ ├── DeprecatedCardWrapper.tsx │ │ │ ├── DeprecatedFAB.tsx │ │ │ ├── FAB.tsx │ │ │ ├── FieldSearchBarFull.tsx │ │ │ ├── Layout.tsx │ │ │ ├── ProgressBar.tsx │ │ │ ├── ProgressCircle.tsx │ │ │ ├── RadioButtonFieldGroup.tsx │ │ │ ├── RowBodyIcon.tsx │ │ │ ├── RowHeadlineImageCaption.tsx │ │ │ ├── RowHeadlineImageIcon.tsx │ │ │ └── ToggleButton.tsx │ │ ├── hooks.ts │ │ ├── index.tsx │ │ ├── interfaces │ │ │ └── Icon.ts │ │ └── utilities.ts │ └── tsconfig.json ├── maps │ ├── .gitignore │ ├── README.md │ ├── app.d.ts │ ├── babel.config.js │ ├── jest-setup.js │ ├── package.json │ ├── src │ │ ├── __tests__ │ │ │ ├── MapMarker.test.tsx │ │ │ ├── MapMarkerCluster.test.tsx │ │ │ └── MapView.test.tsx │ │ ├── components │ │ │ ├── MapCallout.tsx │ │ │ ├── MapCircle.tsx │ │ │ ├── MapMarker.tsx │ │ │ ├── MapView.tsx │ │ │ ├── MapViewCommon.ts │ │ │ ├── marker-cluster │ │ │ │ ├── MapMarkerCluster.tsx │ │ │ │ ├── MapMarkerClusterContext.ts │ │ │ │ ├── MapMarkerClusterView.tsx │ │ │ │ └── index.ts │ │ │ └── react-native-maps │ │ │ │ ├── Callout.tsx │ │ │ │ ├── Callout.web.tsx │ │ │ │ ├── Circle.tsx │ │ │ │ ├── Circle.web.tsx │ │ │ │ ├── MapView.tsx │ │ │ │ ├── MapView.web.tsx │ │ │ │ ├── Marker.tsx │ │ │ │ ├── Marker.web.tsx │ │ │ │ └── index.tsx │ │ ├── index.tsx │ │ └── utils.ts │ ├── teovilla-react-native-web-maps.d.ts │ └── tsconfig.json ├── native │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── package.json │ ├── src │ │ ├── components │ │ │ ├── Icon.d.ts │ │ │ ├── Icon.tsx │ │ │ ├── LinearGradient.d.ts │ │ │ ├── LinearGradient.tsx │ │ │ └── WebView.tsx │ │ ├── index.d.ts │ │ └── index.tsx │ └── tsconfig.json ├── theme │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── package.json │ ├── src │ │ ├── DefaultTheme.ts │ │ ├── Provider.tsx │ │ ├── __tests__ │ │ │ ├── createThemeValuesProxy.test.ts │ │ │ └── validators.test.ts │ │ ├── createTheme.ts │ │ ├── createThemeValuesProxy.ts │ │ ├── index.ts │ │ ├── types.ts │ │ ├── utils.ts │ │ └── validators.ts │ └── tsconfig.json └── ui │ ├── .gitignore │ ├── babel.config.js │ ├── mock-backend.json │ ├── package.json │ ├── src │ ├── index.tsx │ └── polyfillReanimatedWorkletInit.ts │ └── tsconfig.json ├── scripts └── update-versions-all-branch.sh ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | indent_style = space 10 | indent_size = 2 11 | 12 | end_of_line = lf 13 | charset = utf-8 14 | trim_trailing_whitespace = true 15 | insert_final_newline = true 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | # specific for windows script files 3 | *.bat text eol=crlf 4 | *.pbxproj binary linguist-generated 5 | ios/Exponent.xcodeproj/project.pbxproj merge=union -text diff linguist-generated 6 | apps/bare-expo/ios/BareExpo.xcodeproj/project.pbxproj merge=union -text diff linguist-generated 7 | apps/bare-sandbox/ios/bare-sandbox.xcodeproj/project.pbxproj merge=union -text diff linguist-generated 8 | templates/expo-template-bare-minimum/ios/HelloWorld.xcodeproj/project.pbxproj merge=union -text diff linguist-generated 9 | packages/*/build/** -diff linguist-generated 10 | packages/*/plugin/build/** -diff linguist-generated 11 | packages/@*/*/build/** -diff linguist-generated 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | .env 5 | 6 | # XDE 7 | .expo/ 8 | 9 | # VSCode 10 | .vscode/ 11 | jsconfig.json 12 | 13 | # Xcode 14 | # 15 | build/ 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | xcuserdata 25 | *.xccheckout 26 | *.moved-aside 27 | DerivedData 28 | *.hmap 29 | *.ipa 30 | *.xcuserstate 31 | project.xcworkspace 32 | 33 | # Android/IJ 34 | # 35 | .idea 36 | .gradle 37 | local.properties 38 | android.iml 39 | 40 | # Cocoapods 41 | # 42 | example/ios/Pods 43 | 44 | # node.js 45 | # 46 | node_modules/ 47 | npm-debug.log 48 | yarn-debug.log 49 | yarn-error.log 50 | 51 | # BUCK 52 | buck-out/ 53 | \.buckd/ 54 | android/app/libs 55 | android/keystores/debug.keystore 56 | 57 | # Expo 58 | .expo/* 59 | 60 | # generated by bob 61 | lib/ 62 | 63 | example/web-build 64 | completed.json 65 | errors.json 66 | components.json 67 | 68 | js.map 69 | .eslintcache 70 | 71 | **/coverage/** 72 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | npx lint-staged 4 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 16.13 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | coverage/ 3 | dist/ 4 | lib/ 5 | web-build/ 6 | web-report/ 7 | 8 | # Lerna writes to this file on version updates. 9 | lerna.json 10 | 11 | .expo/ 12 | .yarn/ 13 | .vscode/ 14 | 15 | # Logs 16 | completed.json 17 | errors.json 18 | components.json 19 | 20 | # Example 21 | example/node_modules 22 | example/__generated__ 23 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | quoteProps: "consistent", 3 | semi: true, 4 | singleQuote: false, 5 | tabWidth: 2, 6 | trailingComma: "es5", 7 | useTabs: false, 8 | bracketSpacing: true, 9 | endOfLine: "auto", 10 | }; 11 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Draftbit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["@commitlint/config-conventional"], 3 | }; 4 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | .env 5 | 6 | # XDE 7 | .expo/ 8 | 9 | # VSCode 10 | .vscode/ 11 | jsconfig.json 12 | 13 | # Xcode 14 | # 15 | build/ 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | xcuserdata 25 | *.xccheckout 26 | *.moved-aside 27 | DerivedData 28 | *.hmap 29 | *.ipa 30 | *.xcuserstate 31 | project.xcworkspace 32 | 33 | # Android/IJ 34 | # 35 | .idea 36 | .gradle 37 | local.properties 38 | android.iml 39 | 40 | # Cocoapods 41 | # 42 | example/ios/Pods 43 | 44 | # node.js 45 | # 46 | node_modules/ 47 | npm-debug.log 48 | yarn-debug.log 49 | yarn-error.log 50 | 51 | # BUCK 52 | buck-out/ 53 | \.buckd/ 54 | android/app/libs 55 | android/keystores/debug.keystore 56 | 57 | # Expo 58 | .expo/* 59 | 60 | # generated by bob 61 | lib/ 62 | 63 | example/web-build 64 | completed.json 65 | errors.json 66 | components.json 67 | 68 | js.map 69 | .eslintcache 70 | 71 | tsconfig.tsbuildinfo 72 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/README.md: -------------------------------------------------------------------------------- 1 | # `@draftbit/web-maps` 2 | 3 | ## DEPRECATED 4 | 5 | ### Use `@draftbit/maps` for both native and web maps 6 | 7 | --- 8 | 9 | `MapView`, `MapMarker`, and `MapCallout` components, powered by `@react-google-maps/api`. For use on web. 10 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@draftbit/web-maps", 3 | "version": "48.0.0", 4 | "description": "Web Map Components", 5 | "main": "lib/src/index.js", 6 | "types": "lib/src/index.d.ts", 7 | "react-native": "src/index.tsx", 8 | "files": [ 9 | "src", 10 | "lib", 11 | "!**/__tests__", 12 | "!**/__fixtures__", 13 | "!**/__mocks__" 14 | ], 15 | "scripts": { 16 | "clean": "rimraf lib", 17 | "clean:modules": "rimraf node_modules", 18 | "build": "yarn clean && yarn tsc" 19 | }, 20 | "keywords": [ 21 | "react-native", 22 | "ios", 23 | "android" 24 | ], 25 | "publishConfig": { 26 | "access": "public" 27 | }, 28 | "repository": { 29 | "type": "git", 30 | "url": "https://github.com/draftbit/react-native-jigsaw", 31 | "directory": "packages/web-maps" 32 | }, 33 | "author": "Draftbit (https://draftbit.com)", 34 | "license": "MIT", 35 | "bugs": { 36 | "url": "https://github.com/draftbit/react-native-jigsaw/issues" 37 | }, 38 | "homepage": "https://github.com/draftbit/react-native-jigsaw#readme", 39 | "dependencies": { 40 | "@react-google-maps/api": "^2.10.2" 41 | }, 42 | "eslintIgnore": [ 43 | "node_modules/", 44 | "lib/" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/src/components/MapCallout.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { TouchableOpacity } from "react-native"; 3 | import { InfoWindow } from "./ReactGoogleMaps"; 4 | import { markerContext } from "./MapMarker"; 5 | import { MapCalloutProps } from "../mapTypes"; 6 | 7 | /** 8 | * @deprecated DEPRECATED: Use @draftbit/maps 9 | */ 10 | const MapCallout: React.FC> = ({ 11 | anchor, 12 | onPress = () => {}, 13 | children, 14 | }) => { 15 | const { toggleCallout, position, calloutOpened } = 16 | React.useContext(markerContext); 17 | const handleClose = () => toggleCallout(false); 18 | 19 | if (!InfoWindow) { 20 | return null; 21 | } 22 | 23 | return calloutOpened ? ( 24 | 25 | 33 | {children} 34 | 35 | 36 | ) : null; 37 | }; 38 | 39 | export default MapCallout; 40 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/src/components/MapScriptLoader.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useJsApiLoader } from "./ReactGoogleMaps"; 3 | 4 | interface MapScriptLoaderProps { 5 | apiKey: string; 6 | } 7 | 8 | const MapScriptLoader: React.FC< 9 | React.PropsWithChildren 10 | > = ({ children, apiKey }) => { 11 | const { isLoaded } = useJsApiLoader({ 12 | id: "google-map-script", 13 | googleMapsApiKey: apiKey, 14 | }); 15 | 16 | return <>{isLoaded ? children : null}; 17 | }; 18 | 19 | export default MapScriptLoader; 20 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/src/components/NoApiKey.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { Text, View } from "react-native"; 3 | 4 | const NoApiKey = () => ( 5 | 6 | 7 | To use maps on the Web, you need to provide a Google Maps API key, which 8 | can be obtained at 9 | https://developers.google.com/maps/documentation/javascript/get-api-key. 10 | 11 | 12 | ); 13 | 14 | export default NoApiKey; 15 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/src/components/ReactGoogleMaps.tsx: -------------------------------------------------------------------------------- 1 | import { Platform } from "react-native"; 2 | 3 | let GoogleMap: React.ElementType | undefined, 4 | InfoWindow: React.ElementType | undefined, 5 | Marker: React.ElementType | undefined, 6 | useJsApiLoader: any; 7 | 8 | // Importing @react-google-maps/api when using @draftbit/ui on Native Snack causes errors 9 | // .web and .native files are not sufficient for this problem 10 | if (Platform.OS === "web") { 11 | GoogleMap = require("@react-google-maps/api").GoogleMap; 12 | InfoWindow = require("@react-google-maps/api").InfoWindow; 13 | Marker = require("@react-google-maps/api").Marker; 14 | useJsApiLoader = require("@react-google-maps/api").useJsApiLoader; 15 | } 16 | 17 | export { GoogleMap, InfoWindow, Marker, useJsApiLoader }; 18 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/src/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as MapCallout } from "./components/MapCallout"; 2 | export { default as MapMarker } from "./components/MapMarker"; 3 | export { default as MapView } from "./components/MapView"; 4 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/src/mapTypes.tsx: -------------------------------------------------------------------------------- 1 | import { StyleProp, ViewStyle, ImageSourcePropType } from "react-native"; 2 | 3 | type MapTypes = 4 | | "standard" 5 | | "satellite" 6 | | "hybrid" 7 | | "terrain" 8 | | "none" 9 | | "mutedStandard"; 10 | 11 | export type MapRegion = { 12 | latitude: number; 13 | longitude: number; 14 | latitudeDelta: number; 15 | longitudeDelta: number; 16 | }; 17 | 18 | export interface MapMarkerProps { 19 | latitude: number; 20 | longitude: number; 21 | title?: string; 22 | description?: string; 23 | pinColor?: string; 24 | pinImage?: string | ImageSourcePropType; 25 | pinImageSize?: number; 26 | onPress?: (latitude: number, longitude: number) => void; 27 | flat?: boolean; 28 | style?: StyleProp; 29 | } 30 | 31 | export interface MapViewProps { 32 | apiKey: string; 33 | provider?: "google" | null; 34 | latitudeDelta?: number; 35 | longitudeDelta?: number; 36 | zoom?: number; 37 | latitude?: number; 38 | longitude?: number; 39 | mapType?: MapTypes; 40 | zoomEnabled?: boolean; 41 | showsCompass?: boolean; 42 | rotateEnabled?: boolean; 43 | scrollEnabled?: boolean; 44 | loadingEnabled?: boolean; 45 | loadingBackgroundColor?: string; 46 | loadingIndicatorColor?: string; 47 | showsUserLocation?: boolean; 48 | followsUserLocation?: boolean; 49 | showsPointsOfInterest?: boolean; 50 | style?: StyleProp; 51 | markersData?: Array; 52 | keyExtractor: (item: TMarkerData, index: number) => string; 53 | renderItem?: ({ 54 | item, 55 | index, 56 | }: { 57 | item: TMarkerData; 58 | index: number; 59 | }) => JSX.Element; 60 | onRegionChange?: (region: MapRegion) => void; 61 | } 62 | 63 | export interface MapCalloutProps { 64 | title?: string; 65 | description?: string; 66 | anchor: any; 67 | onPress?: (event: any) => void; 68 | showTooltip?: boolean; 69 | } 70 | -------------------------------------------------------------------------------- /deprecated-packages/web-maps/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib/" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/.editorconfig: -------------------------------------------------------------------------------- 1 | # Windows files 2 | [*.bat] 3 | end_of_line = crlf 4 | -------------------------------------------------------------------------------- /example/.gitattributes: -------------------------------------------------------------------------------- 1 | # Windows files should use crlf line endings 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | *.bat text eol=crlf 4 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Expo 2 | .expo 3 | __generated__ 4 | web-build 5 | 6 | # Node 7 | node_modules 8 | npm-debug.log 9 | yarn-error.log 10 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "@draftbit/ui-example", 4 | "slug": "draftbit-ui-example", 5 | "description": "Example app for @draftbit/ui", 6 | "privacy": "public", 7 | "version": "1.0.0", 8 | "platforms": ["ios", "android", "web"], 9 | "icon": "./src/assets/images/icon.png", 10 | "splash": { 11 | "image": "./src/assets/images/splash.png", 12 | "resizeMode": "contain", 13 | "backgroundColor": "#5a45ff" 14 | }, 15 | "ios": { 16 | "supportsTablet": true 17 | }, 18 | "assetBundlePatterns": ["**/*"], 19 | "plugins": ["expo-asset", "expo-font"] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ["babel-preset-expo"], 5 | plugins: [ 6 | "@babel/plugin-transform-export-namespace-from", 7 | "react-native-reanimated/plugin", 8 | ], 9 | }; 10 | }; 11 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | import "react-native-get-random-values"; 2 | import { registerRootComponent } from "expo"; 3 | import App from "./src/App"; 4 | 5 | registerRootComponent(App); 6 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | const { getDefaultConfig } = require("expo/metro-config"); 2 | const path = require("path"); 3 | 4 | // Follows https://docs.expo.dev/guides/monorepos/ 5 | 6 | // Find the project and workspace directories 7 | const projectRoot = __dirname; 8 | // This can be replaced with `find-yarn-workspace-root` 9 | const workspaceRoot = path.resolve(projectRoot, ".."); 10 | 11 | const config = getDefaultConfig(projectRoot); 12 | 13 | // 1. Watch all files within the monorepo 14 | config.watchFolders = [workspaceRoot]; 15 | // 2. Let Metro know where to resolve packages and in what order 16 | config.resolver.nodeModulesPaths = [ 17 | path.resolve(projectRoot, "node_modules"), 18 | path.resolve(workspaceRoot, "node_modules"), 19 | ]; 20 | // 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths` 21 | config.resolver.disableHierarchicalLookup = true; 22 | 23 | module.exports = config; 24 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@draftbit/example", 3 | "description": "Example app for @draftbit/ui", 4 | "version": "52.1.9", 5 | "private": true, 6 | "scripts": { 7 | "android": "expo start --android", 8 | "ios": "expo start --ios", 9 | "web": "expo start --web", 10 | "start": "expo start", 11 | "test": "jest", 12 | "test:coverage": "jest --coverage", 13 | "example": "yarn --cwd example", 14 | "clean:modules": "rimraf node_modules" 15 | }, 16 | "dependencies": { 17 | "@draftbit/maps": "52.1.9", 18 | "@draftbit/ui": "52.1.9", 19 | "@expo/dev-server": "0.1.123", 20 | "@expo/metro-runtime": "~4.0.0", 21 | "@react-navigation/drawer": "^6.6.3", 22 | "@react-navigation/native": "^6.1.7", 23 | "@shopify/flash-list": "1.7.1", 24 | "expo": "^52.0.0", 25 | "expo-asset": "~11.0.1", 26 | "expo-constants": "~17.0.3", 27 | "expo-font": "~13.0.1", 28 | "expo-splash-screen": "~0.29.13", 29 | "expo-status-bar": "~2.0.0", 30 | "react": "18.3.1", 31 | "react-dom": "18.3.1", 32 | "react-native": "0.76.3", 33 | "react-native-gesture-handler": "~2.20.2", 34 | "react-native-get-random-values": "~1.11.0", 35 | "react-native-reanimated": "~3.16.1", 36 | "react-native-safe-area-context": "4.12.0", 37 | "react-native-screens": "~4.1.0", 38 | "react-native-web": "~0.19.10", 39 | "uuid": "^9.0.1" 40 | }, 41 | "devDependencies": { 42 | "@babel/core": "^7.24.0", 43 | "@types/react": "~18.3.12", 44 | "@types/react-native": "~0.70.6", 45 | "babel-loader": "8.1.0", 46 | "sharp-cli": "2.1.0" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /example/src/AccordionExample.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { Text, View } from "react-native"; 3 | import { AccordionGroup, withTheme } from "@draftbit/ui"; 4 | import Section, { Container } from "./Section"; 5 | 6 | function AccordionExample({ theme }) { 7 | return ( 8 | 9 |
10 | 11 | Item 1 12 | Item 2 13 | 14 |
15 |
16 | 25 | Item 1 26 | Item 2 27 | 28 |
29 |
30 | 40 | Item 1 41 | Item 2 42 | 43 |
44 |
45 | ); 46 | } 47 | 48 | export default withTheme(AccordionExample); 49 | -------------------------------------------------------------------------------- /example/src/ActionSheetExample.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { 3 | ActionSheet, 4 | ActionSheetItem, 5 | ActionSheetCancel, 6 | ButtonSolid, 7 | withTheme, 8 | } from "@draftbit/ui"; 9 | import Section, { Container } from "./Section"; 10 | 11 | function ActionSheetExample({ theme }) { 12 | const [visible, setVisible] = React.useState(false); 13 | 14 | const showActionSheet = React.useCallback(() => { 15 | setVisible(true); 16 | }, []); 17 | 18 | const hideActionSheet = React.useCallback(() => { 19 | setVisible(false); 20 | }, []); 21 | 22 | return ( 23 | 24 |
25 | 26 | 27 | 32 | 37 | 38 | 39 | 40 |
41 |
42 | ); 43 | } 44 | 45 | export default withTheme(ActionSheetExample); 46 | -------------------------------------------------------------------------------- /example/src/BottomSheetExample.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Text, View } from "react-native"; 3 | import { BottomSheet } from "@draftbit/ui"; 4 | import { Button } from "@draftbit/core"; 5 | 6 | const BottomSheetExample: React.FC = () => { 7 | const bottomSheetRef = React.useRef(); 8 | const [snapIndex, setSnapIndex] = React.useState(0); 9 | return ( 10 | 11 | { 16 | try { 17 | console.log("onSettle", newIndex); 18 | setSnapIndex(newIndex); 19 | } catch (error) { 20 | console.error("Error in onSettle:", error); 21 | } 22 | }} 23 | > 24 | This is a bottom Sheet 25 | 26 |