create-du-app 0.1.3 → 0.1.5
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/README.md +15 -9
- package/package.json +6 -5
- package/src/generate.js +15 -2
- package/src/index.js +15 -9
- package/src/prompts.js +1 -1
- package/templates/mobile/expo/.env.example +5 -0
- package/templates/mobile/expo/.eslintrc.js +7 -0
- package/templates/mobile/expo/.prettierrc.js +7 -0
- package/templates/mobile/expo/.svgrrc.js +9 -0
- package/templates/mobile/expo/README.md +70 -7
- package/templates/mobile/expo/_gitignore +20 -0
- package/templates/mobile/expo/_package.json +60 -1
- package/templates/mobile/expo/app.json +26 -0
- package/templates/mobile/expo/babel.config.js +21 -0
- package/templates/mobile/expo/index.js +7 -0
- package/templates/mobile/expo/metro.config.js +31 -0
- package/templates/mobile/expo/src/app/App.tsx +24 -0
- package/templates/mobile/expo/src/app/app-provider.tsx +40 -0
- package/templates/mobile/expo/src/app/config/translation.ts +30 -0
- package/templates/mobile/expo/src/app/index.ts +1 -0
- package/templates/mobile/expo/src/app/navigation/app-route-type.ts +27 -0
- package/templates/mobile/expo/src/app/navigation/bottom-tabs.tsx +34 -0
- package/templates/mobile/expo/src/app/navigation/index.tsx +14 -0
- package/templates/mobile/expo/src/app/stores/auth.store.ts +33 -0
- package/templates/mobile/expo/src/app/stores/common.store.ts +19 -0
- package/templates/mobile/expo/src/app/stores/index.ts +3 -0
- package/templates/mobile/expo/src/app/stores/loading.store.ts +22 -0
- package/templates/mobile/expo/src/assets/Images/empty-list.png +0 -0
- package/templates/mobile/expo/src/assets/Images/index.ts +5 -0
- package/templates/mobile/expo/src/assets/Images/screen-bg-gradian.png +0 -0
- package/templates/mobile/expo/src/assets/i18n/en.json +28 -0
- package/templates/mobile/expo/src/assets/i18n/fr.json +28 -0
- package/templates/mobile/expo/src/assets/lotties/index.ts +3 -0
- package/templates/mobile/expo/src/assets/lotties/loading.json +1 -0
- package/templates/mobile/expo/src/assets/svgs/arrow-left.svg +3 -0
- package/templates/mobile/expo/src/assets/svgs/arrow-right.svg +3 -0
- package/templates/mobile/expo/src/assets/svgs/calendar.svg +12 -0
- package/templates/mobile/expo/src/assets/svgs/check.svg +3 -0
- package/templates/mobile/expo/src/assets/svgs/close.svg +3 -0
- package/templates/mobile/expo/src/assets/svgs/eye-hide.svg +3 -0
- package/templates/mobile/expo/src/assets/svgs/eye.svg +4 -0
- package/templates/mobile/expo/src/assets/svgs/index.ts +29 -0
- package/templates/mobile/expo/src/assets/svgs/minus.svg +3 -0
- package/templates/mobile/expo/src/assets/svgs/plus.svg +3 -0
- package/templates/mobile/expo/src/assets/svgs/search.svg +3 -0
- package/templates/mobile/expo/src/assets/svgs/toast-error.svg +5 -0
- package/templates/mobile/expo/src/assets/svgs/toast-success.svg +4 -0
- package/templates/mobile/expo/src/core/api/endpoints.ts +8 -0
- package/templates/mobile/expo/src/core/api/example.api.ts +53 -0
- package/templates/mobile/expo/src/core/api/index.ts +4 -0
- package/templates/mobile/expo/src/core/components/common/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/common/list-empty/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/common/list-empty/list-empty.tsx +30 -0
- package/templates/mobile/expo/src/core/components/common/list-empty/list-empty.type.ts +5 -0
- package/templates/mobile/expo/src/core/components/forms/date-time-picker.modal.tsx +116 -0
- package/templates/mobile/expo/src/core/components/forms/hf-date-time.tsx +293 -0
- package/templates/mobile/expo/src/core/components/forms/hf-password-input.tsx +153 -0
- package/templates/mobile/expo/src/core/components/forms/hf-text-input.tsx +59 -0
- package/templates/mobile/expo/src/core/components/forms/hf-time-picker.tsx +116 -0
- package/templates/mobile/expo/src/core/components/forms/index.ts +4 -0
- package/templates/mobile/expo/src/core/components/index.ts +5 -0
- package/templates/mobile/expo/src/core/components/loading/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/loading/loading-app/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/loading/loading-app/loading-app.tsx +50 -0
- package/templates/mobile/expo/src/core/components/offline/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/offline/offline-banner.tsx +186 -0
- package/templates/mobile/expo/src/core/components/screen/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/screen/screen-container/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/screen/screen-container/screen-container.tsx +248 -0
- package/templates/mobile/expo/src/core/components/splash/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/splash/splash-overlay/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/splash/splash-overlay/splash-overlay.tsx +93 -0
- package/templates/mobile/expo/src/core/components/ui/animated-list-item/animated-list-item.tsx +48 -0
- package/templates/mobile/expo/src/core/components/ui/animated-list-item/animated-list-item.type.ts +10 -0
- package/templates/mobile/expo/src/core/components/ui/animated-list-item/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/app-image/app-image.tsx +101 -0
- package/templates/mobile/expo/src/core/components/ui/app-image/app-image.type.ts +19 -0
- package/templates/mobile/expo/src/core/components/ui/app-image/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/asset-placeholder/asset-placeholder.tsx +76 -0
- package/templates/mobile/expo/src/core/components/ui/asset-placeholder/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/ui/avatar-image/avatar-image.tsx +90 -0
- package/templates/mobile/expo/src/core/components/ui/avatar-image/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/ui/bottom-sheet/bottom-sheet.tsx +145 -0
- package/templates/mobile/expo/src/core/components/ui/bottom-sheet/bottom-sheet.type.ts +10 -0
- package/templates/mobile/expo/src/core/components/ui/bottom-sheet/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/button/button.style.ts +146 -0
- package/templates/mobile/expo/src/core/components/ui/button/button.tsx +97 -0
- package/templates/mobile/expo/src/core/components/ui/button/button.type.ts +47 -0
- package/templates/mobile/expo/src/core/components/ui/button/index.ts +4 -0
- package/templates/mobile/expo/src/core/components/ui/checkbox/checkbox.tsx +127 -0
- package/templates/mobile/expo/src/core/components/ui/checkbox/checkbox.type.ts +24 -0
- package/templates/mobile/expo/src/core/components/ui/checkbox/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/collapsible-section/collapsible-section.tsx +141 -0
- package/templates/mobile/expo/src/core/components/ui/collapsible-section/collapsible-section.type.ts +10 -0
- package/templates/mobile/expo/src/core/components/ui/collapsible-section/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/components.registry.json +313 -0
- package/templates/mobile/expo/src/core/components/ui/field/field-frame.tsx +62 -0
- package/templates/mobile/expo/src/core/components/ui/field/field.shared.ts +31 -0
- package/templates/mobile/expo/src/core/components/ui/header/header.tsx +196 -0
- package/templates/mobile/expo/src/core/components/ui/header/header.type.ts +30 -0
- package/templates/mobile/expo/src/core/components/ui/header/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/icon-button/icon-button.style.ts +23 -0
- package/templates/mobile/expo/src/core/components/ui/icon-button/icon-button.tsx +66 -0
- package/templates/mobile/expo/src/core/components/ui/icon-button/icon-button.type.ts +25 -0
- package/templates/mobile/expo/src/core/components/ui/icon-button/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/image-slider/image-slider.tsx +107 -0
- package/templates/mobile/expo/src/core/components/ui/image-slider/image-slider.type.ts +10 -0
- package/templates/mobile/expo/src/core/components/ui/image-slider/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/index.ts +25 -0
- package/templates/mobile/expo/src/core/components/ui/label/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/label/label.tsx +36 -0
- package/templates/mobile/expo/src/core/components/ui/label/label.type.ts +12 -0
- package/templates/mobile/expo/src/core/components/ui/modal/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/modal/modal.tsx +62 -0
- package/templates/mobile/expo/src/core/components/ui/modal/modal.type.ts +11 -0
- package/templates/mobile/expo/src/core/components/ui/otp-input/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/otp-input/otp-input.tsx +129 -0
- package/templates/mobile/expo/src/core/components/ui/otp-input/otp-input.type.ts +20 -0
- package/templates/mobile/expo/src/core/components/ui/page-dots/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/ui/page-dots/page-dots.tsx +60 -0
- package/templates/mobile/expo/src/core/components/ui/radio/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/radio/radio.tsx +121 -0
- package/templates/mobile/expo/src/core/components/ui/radio/radio.type.ts +20 -0
- package/templates/mobile/expo/src/core/components/ui/screen/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/ui/screen/screen-gradient.tsx +33 -0
- package/templates/mobile/expo/src/core/components/ui/search-box/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/search-box/search-box.tsx +162 -0
- package/templates/mobile/expo/src/core/components/ui/search-box/search-box.type.ts +26 -0
- package/templates/mobile/expo/src/core/components/ui/segmented-control/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/segmented-control/segmented-control.tsx +86 -0
- package/templates/mobile/expo/src/core/components/ui/segmented-control/segmented-control.type.ts +22 -0
- package/templates/mobile/expo/src/core/components/ui/skeleton/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/skeleton/skeleton.tsx +106 -0
- package/templates/mobile/expo/src/core/components/ui/skeleton/skeleton.type.ts +8 -0
- package/templates/mobile/expo/src/core/components/ui/success-state/index.ts +1 -0
- package/templates/mobile/expo/src/core/components/ui/success-state/success-state.tsx +68 -0
- package/templates/mobile/expo/src/core/components/ui/tabs/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/tabs/tabs.tsx +273 -0
- package/templates/mobile/expo/src/core/components/ui/tabs/tabs.type.ts +21 -0
- package/templates/mobile/expo/src/core/components/ui/tag-input/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/tag-input/tag-input.tsx +146 -0
- package/templates/mobile/expo/src/core/components/ui/tag-input/tag-input.type.ts +22 -0
- package/templates/mobile/expo/src/core/components/ui/text-area/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/text-area/text-area.tsx +90 -0
- package/templates/mobile/expo/src/core/components/ui/text-area/text-area.type.ts +20 -0
- package/templates/mobile/expo/src/core/components/ui/text-field/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/text-field/text-field.tsx +116 -0
- package/templates/mobile/expo/src/core/components/ui/text-field/text-field.type.ts +21 -0
- package/templates/mobile/expo/src/core/components/ui/toggle/index.ts +2 -0
- package/templates/mobile/expo/src/core/components/ui/toggle/toggle.tsx +110 -0
- package/templates/mobile/expo/src/core/components/ui/toggle/toggle.type.ts +19 -0
- package/templates/mobile/expo/src/core/constants/external-urls.constant.ts +5 -0
- package/templates/mobile/expo/src/core/constants/hard-data.constant.ts +0 -0
- package/templates/mobile/expo/src/core/constants/index.ts +2 -0
- package/templates/mobile/expo/src/core/constants/type.constant.ts +3 -0
- package/templates/mobile/expo/src/core/context/index.ts +1 -0
- package/templates/mobile/expo/src/core/context/shared-transition-context.tsx +35 -0
- package/templates/mobile/expo/src/core/hook/index.ts +8 -0
- package/templates/mobile/expo/src/core/hook/useActiveRouteName.ts +63 -0
- package/templates/mobile/expo/src/core/hook/useAppNavigation.tsx +7 -0
- package/templates/mobile/expo/src/core/hook/useBottomInset.tsx +26 -0
- package/templates/mobile/expo/src/core/hook/useDebounce.tsx +16 -0
- package/templates/mobile/expo/src/core/hook/useEndReached.tsx +46 -0
- package/templates/mobile/expo/src/core/hook/useManualRefetch.ts +56 -0
- package/templates/mobile/expo/src/core/hook/useNetworkStatus.ts +68 -0
- package/templates/mobile/expo/src/core/hook/useTimeout.tsx +30 -0
- package/templates/mobile/expo/src/core/index.ts +7 -0
- package/templates/mobile/expo/src/core/services/api.service.ts +230 -0
- package/templates/mobile/expo/src/core/services/device-id.service.ts +37 -0
- package/templates/mobile/expo/src/core/services/index.ts +3 -0
- package/templates/mobile/expo/src/core/services/session-end.bridge.ts +26 -0
- package/templates/mobile/expo/src/core/theme/dark.theme.ts +10 -0
- package/templates/mobile/expo/src/core/theme/index.ts +5 -0
- package/templates/mobile/expo/src/core/theme/light.theme.ts +44 -0
- package/templates/mobile/expo/src/core/theme/theme-context.tsx +82 -0
- package/templates/mobile/expo/src/core/theme/theme.types.ts +26 -0
- package/templates/mobile/expo/src/core/theme/use-themed-styles.ts +25 -0
- package/templates/mobile/expo/src/core/utils/color.util.tsx +198 -0
- package/templates/mobile/expo/src/core/utils/date.util.ts +97 -0
- package/templates/mobile/expo/src/core/utils/device-locale.util.ts +24 -0
- package/templates/mobile/expo/src/core/utils/emitter/index.ts +161 -0
- package/templates/mobile/expo/src/core/utils/emitter/type.ts +40 -0
- package/templates/mobile/expo/src/core/utils/enum.util.tsx +15 -0
- package/templates/mobile/expo/src/core/utils/font.util.tsx +42 -0
- package/templates/mobile/expo/src/core/utils/func.util.ts +48 -0
- package/templates/mobile/expo/src/core/utils/greeting.util.ts +20 -0
- package/templates/mobile/expo/src/core/utils/image-format.util.ts +117 -0
- package/templates/mobile/expo/src/core/utils/image-picker.util.ts +63 -0
- package/templates/mobile/expo/src/core/utils/index.ts +18 -0
- package/templates/mobile/expo/src/core/utils/linking.util.ts +16 -0
- package/templates/mobile/expo/src/core/utils/navigation.util.tsx +100 -0
- package/templates/mobile/expo/src/core/utils/number-format.ts +28 -0
- package/templates/mobile/expo/src/core/utils/query-client.util.ts +35 -0
- package/templates/mobile/expo/src/core/utils/query-persister.util.ts +31 -0
- package/templates/mobile/expo/src/core/utils/schema.util.tsx +2713 -0
- package/templates/mobile/expo/src/core/utils/size.util.tsx +74 -0
- package/templates/mobile/expo/src/core/utils/storage.util.tsx +53 -0
- package/templates/mobile/expo/src/core/utils/toast.util.tsx +151 -0
- package/templates/mobile/expo/src/core/utils/translator.util.tsx +23 -0
- package/templates/mobile/expo/src/core/utils/typography.util.tsx +69 -0
- package/templates/mobile/expo/src/core/utils/validate.util.tsx +13 -0
- package/templates/mobile/expo/src/declarations.d.ts +54 -0
- package/templates/mobile/expo/src/modules/home/home.screen.tsx +110 -0
- package/templates/mobile/expo/src/modules/profile/profile.screen.tsx +29 -0
- package/templates/mobile/expo/src/scripts/link-fonts.js +60 -0
- package/templates/mobile/expo/src/scripts/sync-images.js +56 -0
- package/templates/mobile/expo/src/scripts/sync-svgs.js +50 -0
- package/templates/mobile/expo/src/types/models.d.ts +24 -0
- package/templates/mobile/expo/tsconfig.json +19 -0
- package/templates/mobile/rn/.bundle/config +2 -0
- package/templates/mobile/rn/.env.example +5 -0
- package/templates/mobile/rn/.eslintrc.js +7 -0
- package/templates/mobile/rn/.prettierrc.js +7 -0
- package/templates/mobile/rn/.svgrrc.js +9 -0
- package/templates/mobile/rn/.watchmanconfig +1 -0
- package/templates/mobile/rn/Gemfile +17 -0
- package/templates/mobile/rn/README.md +72 -7
- package/templates/mobile/rn/_gitignore +24 -0
- package/templates/mobile/rn/_package.json +69 -1
- package/templates/mobile/rn/android/app/build.gradle +126 -0
- package/templates/mobile/rn/android/app/debug.keystore +0 -0
- package/templates/mobile/rn/android/app/proguard-rules.pro +10 -0
- package/templates/mobile/rn/android/app/src/main/AndroidManifest.xml +27 -0
- package/templates/mobile/rn/android/app/src/main/java/com/dumobile/MainActivity.kt +22 -0
- package/templates/mobile/rn/android/app/src/main/java/com/dumobile/MainApplication.kt +27 -0
- package/templates/mobile/rn/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/templates/mobile/rn/android/app/src/main/res/values/strings.xml +3 -0
- package/templates/mobile/rn/android/app/src/main/res/values/styles.xml +9 -0
- package/templates/mobile/rn/android/build.gradle +21 -0
- package/templates/mobile/rn/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/templates/mobile/rn/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/templates/mobile/rn/android/gradle.properties +44 -0
- package/templates/mobile/rn/android/gradlew +248 -0
- package/templates/mobile/rn/android/gradlew.bat +98 -0
- package/templates/mobile/rn/android/settings.gradle +21 -0
- package/templates/mobile/rn/app.json +4 -0
- package/templates/mobile/rn/babel.config.js +18 -0
- package/templates/mobile/rn/index.js +10 -0
- package/templates/mobile/rn/ios/.xcode.env +11 -0
- package/templates/mobile/rn/ios/DuMobile/AppDelegate.swift +48 -0
- package/templates/mobile/rn/ios/DuMobile/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/templates/mobile/rn/ios/DuMobile/Images.xcassets/Contents.json +6 -0
- package/templates/mobile/rn/ios/DuMobile/Info.plist +59 -0
- package/templates/mobile/rn/ios/DuMobile/LaunchScreen.storyboard +47 -0
- package/templates/mobile/rn/ios/DuMobile/PrivacyInfo.xcprivacy +37 -0
- package/templates/mobile/rn/ios/DuMobile.xcodeproj/project.pbxproj +475 -0
- package/templates/mobile/rn/ios/DuMobile.xcodeproj/xcshareddata/xcschemes/DuMobile.xcscheme +88 -0
- package/templates/mobile/rn/ios/Podfile +34 -0
- package/templates/mobile/rn/metro.config.js +33 -0
- package/templates/mobile/rn/src/app/App.tsx +24 -0
- package/templates/mobile/rn/src/app/app-provider.tsx +41 -0
- package/templates/mobile/rn/src/app/config/translation.ts +29 -0
- package/templates/mobile/rn/src/app/index.ts +1 -0
- package/templates/mobile/rn/src/app/navigation/app-route-type.ts +27 -0
- package/templates/mobile/rn/src/app/navigation/bottom-tabs.tsx +34 -0
- package/templates/mobile/rn/src/app/navigation/index.tsx +14 -0
- package/templates/mobile/rn/src/app/stores/auth.store.ts +33 -0
- package/templates/mobile/rn/src/app/stores/common.store.ts +19 -0
- package/templates/mobile/rn/src/app/stores/index.ts +3 -0
- package/templates/mobile/rn/src/app/stores/loading.store.ts +22 -0
- package/templates/mobile/rn/src/assets/Images/empty-list.png +0 -0
- package/templates/mobile/rn/src/assets/Images/index.ts +5 -0
- package/templates/mobile/rn/src/assets/Images/screen-bg-gradian.png +0 -0
- package/templates/mobile/rn/src/assets/i18n/en.json +22 -0
- package/templates/mobile/rn/src/assets/i18n/fr.json +22 -0
- package/templates/mobile/rn/src/assets/lotties/index.ts +3 -0
- package/templates/mobile/rn/src/assets/lotties/loading.json +1 -0
- package/templates/mobile/rn/src/assets/svgs/arrow-left.svg +3 -0
- package/templates/mobile/rn/src/assets/svgs/arrow-right.svg +3 -0
- package/templates/mobile/rn/src/assets/svgs/calendar.svg +12 -0
- package/templates/mobile/rn/src/assets/svgs/check.svg +3 -0
- package/templates/mobile/rn/src/assets/svgs/close.svg +3 -0
- package/templates/mobile/rn/src/assets/svgs/eye-hide.svg +3 -0
- package/templates/mobile/rn/src/assets/svgs/eye.svg +4 -0
- package/templates/mobile/rn/src/assets/svgs/index.ts +29 -0
- package/templates/mobile/rn/src/assets/svgs/minus.svg +3 -0
- package/templates/mobile/rn/src/assets/svgs/plus.svg +3 -0
- package/templates/mobile/rn/src/assets/svgs/search.svg +3 -0
- package/templates/mobile/rn/src/assets/svgs/toast-error.svg +5 -0
- package/templates/mobile/rn/src/assets/svgs/toast-success.svg +4 -0
- package/templates/mobile/rn/src/core/api/endpoints.ts +8 -0
- package/templates/mobile/rn/src/core/api/example.api.ts +53 -0
- package/templates/mobile/rn/src/core/api/index.ts +4 -0
- package/templates/mobile/rn/src/core/components/common/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/common/list-empty/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/common/list-empty/list-empty.tsx +30 -0
- package/templates/mobile/rn/src/core/components/common/list-empty/list-empty.type.ts +5 -0
- package/templates/mobile/rn/src/core/components/forms/hf-date-time.tsx +301 -0
- package/templates/mobile/rn/src/core/components/forms/hf-password-input.tsx +153 -0
- package/templates/mobile/rn/src/core/components/forms/hf-text-input.tsx +59 -0
- package/templates/mobile/rn/src/core/components/forms/hf-time-picker.tsx +117 -0
- package/templates/mobile/rn/src/core/components/forms/index.ts +4 -0
- package/templates/mobile/rn/src/core/components/index.ts +5 -0
- package/templates/mobile/rn/src/core/components/loading/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/loading/loading-app/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/loading/loading-app/loading-app.tsx +50 -0
- package/templates/mobile/rn/src/core/components/offline/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/offline/offline-banner.tsx +186 -0
- package/templates/mobile/rn/src/core/components/screen/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/screen/screen-container/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/screen/screen-container/screen-container.tsx +252 -0
- package/templates/mobile/rn/src/core/components/splash/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/splash/splash-overlay/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/splash/splash-overlay/splash-overlay.tsx +93 -0
- package/templates/mobile/rn/src/core/components/ui/animated-list-item/animated-list-item.tsx +48 -0
- package/templates/mobile/rn/src/core/components/ui/animated-list-item/animated-list-item.type.ts +10 -0
- package/templates/mobile/rn/src/core/components/ui/animated-list-item/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/app-image/app-image.tsx +104 -0
- package/templates/mobile/rn/src/core/components/ui/app-image/app-image.type.ts +19 -0
- package/templates/mobile/rn/src/core/components/ui/app-image/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/asset-placeholder/asset-placeholder.tsx +76 -0
- package/templates/mobile/rn/src/core/components/ui/asset-placeholder/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/ui/avatar-image/avatar-image.tsx +90 -0
- package/templates/mobile/rn/src/core/components/ui/avatar-image/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/ui/bottom-sheet/bottom-sheet.tsx +145 -0
- package/templates/mobile/rn/src/core/components/ui/bottom-sheet/bottom-sheet.type.ts +10 -0
- package/templates/mobile/rn/src/core/components/ui/bottom-sheet/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/button/button.style.ts +146 -0
- package/templates/mobile/rn/src/core/components/ui/button/button.tsx +97 -0
- package/templates/mobile/rn/src/core/components/ui/button/button.type.ts +47 -0
- package/templates/mobile/rn/src/core/components/ui/button/index.ts +4 -0
- package/templates/mobile/rn/src/core/components/ui/checkbox/checkbox.tsx +127 -0
- package/templates/mobile/rn/src/core/components/ui/checkbox/checkbox.type.ts +24 -0
- package/templates/mobile/rn/src/core/components/ui/checkbox/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/collapsible-section/collapsible-section.tsx +141 -0
- package/templates/mobile/rn/src/core/components/ui/collapsible-section/collapsible-section.type.ts +10 -0
- package/templates/mobile/rn/src/core/components/ui/collapsible-section/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/components.registry.json +313 -0
- package/templates/mobile/rn/src/core/components/ui/field/field-frame.tsx +62 -0
- package/templates/mobile/rn/src/core/components/ui/field/field.shared.ts +31 -0
- package/templates/mobile/rn/src/core/components/ui/header/header.tsx +196 -0
- package/templates/mobile/rn/src/core/components/ui/header/header.type.ts +30 -0
- package/templates/mobile/rn/src/core/components/ui/header/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/icon-button/icon-button.style.ts +23 -0
- package/templates/mobile/rn/src/core/components/ui/icon-button/icon-button.tsx +66 -0
- package/templates/mobile/rn/src/core/components/ui/icon-button/icon-button.type.ts +25 -0
- package/templates/mobile/rn/src/core/components/ui/icon-button/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/image-slider/image-slider.tsx +107 -0
- package/templates/mobile/rn/src/core/components/ui/image-slider/image-slider.type.ts +10 -0
- package/templates/mobile/rn/src/core/components/ui/image-slider/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/index.ts +25 -0
- package/templates/mobile/rn/src/core/components/ui/label/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/label/label.tsx +36 -0
- package/templates/mobile/rn/src/core/components/ui/label/label.type.ts +12 -0
- package/templates/mobile/rn/src/core/components/ui/modal/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/modal/modal.tsx +62 -0
- package/templates/mobile/rn/src/core/components/ui/modal/modal.type.ts +11 -0
- package/templates/mobile/rn/src/core/components/ui/otp-input/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/otp-input/otp-input.tsx +129 -0
- package/templates/mobile/rn/src/core/components/ui/otp-input/otp-input.type.ts +20 -0
- package/templates/mobile/rn/src/core/components/ui/page-dots/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/ui/page-dots/page-dots.tsx +60 -0
- package/templates/mobile/rn/src/core/components/ui/radio/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/radio/radio.tsx +121 -0
- package/templates/mobile/rn/src/core/components/ui/radio/radio.type.ts +20 -0
- package/templates/mobile/rn/src/core/components/ui/screen/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/ui/screen/screen-gradient.tsx +33 -0
- package/templates/mobile/rn/src/core/components/ui/search-box/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/search-box/search-box.tsx +162 -0
- package/templates/mobile/rn/src/core/components/ui/search-box/search-box.type.ts +26 -0
- package/templates/mobile/rn/src/core/components/ui/segmented-control/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/segmented-control/segmented-control.tsx +86 -0
- package/templates/mobile/rn/src/core/components/ui/segmented-control/segmented-control.type.ts +22 -0
- package/templates/mobile/rn/src/core/components/ui/skeleton/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/skeleton/skeleton.tsx +106 -0
- package/templates/mobile/rn/src/core/components/ui/skeleton/skeleton.type.ts +8 -0
- package/templates/mobile/rn/src/core/components/ui/success-state/index.ts +1 -0
- package/templates/mobile/rn/src/core/components/ui/success-state/success-state.tsx +68 -0
- package/templates/mobile/rn/src/core/components/ui/tabs/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/tabs/tabs.tsx +273 -0
- package/templates/mobile/rn/src/core/components/ui/tabs/tabs.type.ts +21 -0
- package/templates/mobile/rn/src/core/components/ui/tag-input/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/tag-input/tag-input.tsx +146 -0
- package/templates/mobile/rn/src/core/components/ui/tag-input/tag-input.type.ts +22 -0
- package/templates/mobile/rn/src/core/components/ui/text-area/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/text-area/text-area.tsx +90 -0
- package/templates/mobile/rn/src/core/components/ui/text-area/text-area.type.ts +20 -0
- package/templates/mobile/rn/src/core/components/ui/text-field/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/text-field/text-field.tsx +116 -0
- package/templates/mobile/rn/src/core/components/ui/text-field/text-field.type.ts +21 -0
- package/templates/mobile/rn/src/core/components/ui/toggle/index.ts +2 -0
- package/templates/mobile/rn/src/core/components/ui/toggle/toggle.tsx +110 -0
- package/templates/mobile/rn/src/core/components/ui/toggle/toggle.type.ts +19 -0
- package/templates/mobile/rn/src/core/constants/external-urls.constant.ts +5 -0
- package/templates/mobile/rn/src/core/constants/hard-data.constant.ts +0 -0
- package/templates/mobile/rn/src/core/constants/index.ts +2 -0
- package/templates/mobile/rn/src/core/constants/type.constant.ts +3 -0
- package/templates/mobile/rn/src/core/context/index.ts +1 -0
- package/templates/mobile/rn/src/core/context/shared-transition-context.tsx +35 -0
- package/templates/mobile/rn/src/core/hook/index.ts +8 -0
- package/templates/mobile/rn/src/core/hook/useActiveRouteName.ts +63 -0
- package/templates/mobile/rn/src/core/hook/useAppNavigation.tsx +7 -0
- package/templates/mobile/rn/src/core/hook/useBottomInset.tsx +26 -0
- package/templates/mobile/rn/src/core/hook/useDebounce.tsx +16 -0
- package/templates/mobile/rn/src/core/hook/useEndReached.tsx +46 -0
- package/templates/mobile/rn/src/core/hook/useManualRefetch.ts +56 -0
- package/templates/mobile/rn/src/core/hook/useNetworkStatus.ts +68 -0
- package/templates/mobile/rn/src/core/hook/useTimeout.tsx +30 -0
- package/templates/mobile/rn/src/core/index.ts +7 -0
- package/templates/mobile/rn/src/core/services/api.service.ts +230 -0
- package/templates/mobile/rn/src/core/services/device-id.service.ts +23 -0
- package/templates/mobile/rn/src/core/services/index.ts +3 -0
- package/templates/mobile/rn/src/core/services/session-end.bridge.ts +26 -0
- package/templates/mobile/rn/src/core/theme/dark.theme.ts +10 -0
- package/templates/mobile/rn/src/core/theme/index.ts +5 -0
- package/templates/mobile/rn/src/core/theme/light.theme.ts +44 -0
- package/templates/mobile/rn/src/core/theme/theme-context.tsx +82 -0
- package/templates/mobile/rn/src/core/theme/theme.types.ts +26 -0
- package/templates/mobile/rn/src/core/theme/use-themed-styles.ts +25 -0
- package/templates/mobile/rn/src/core/utils/color.util.tsx +198 -0
- package/templates/mobile/rn/src/core/utils/date.util.ts +97 -0
- package/templates/mobile/rn/src/core/utils/device-locale.util.ts +22 -0
- package/templates/mobile/rn/src/core/utils/emitter/index.ts +161 -0
- package/templates/mobile/rn/src/core/utils/emitter/type.ts +40 -0
- package/templates/mobile/rn/src/core/utils/enum.util.tsx +15 -0
- package/templates/mobile/rn/src/core/utils/font.util.tsx +42 -0
- package/templates/mobile/rn/src/core/utils/func.util.ts +48 -0
- package/templates/mobile/rn/src/core/utils/greeting.util.ts +20 -0
- package/templates/mobile/rn/src/core/utils/image-format.util.ts +117 -0
- package/templates/mobile/rn/src/core/utils/image-picker.util.ts +84 -0
- package/templates/mobile/rn/src/core/utils/index.ts +18 -0
- package/templates/mobile/rn/src/core/utils/linking.util.ts +16 -0
- package/templates/mobile/rn/src/core/utils/navigation.util.tsx +100 -0
- package/templates/mobile/rn/src/core/utils/number-format.ts +28 -0
- package/templates/mobile/rn/src/core/utils/query-client.util.ts +35 -0
- package/templates/mobile/rn/src/core/utils/query-persister.util.ts +36 -0
- package/templates/mobile/rn/src/core/utils/schema.util.tsx +2713 -0
- package/templates/mobile/rn/src/core/utils/size.util.tsx +74 -0
- package/templates/mobile/rn/src/core/utils/storage.util.tsx +53 -0
- package/templates/mobile/rn/src/core/utils/toast.util.tsx +151 -0
- package/templates/mobile/rn/src/core/utils/translator.util.tsx +23 -0
- package/templates/mobile/rn/src/core/utils/typography.util.tsx +69 -0
- package/templates/mobile/rn/src/core/utils/validate.util.tsx +13 -0
- package/templates/mobile/rn/src/declarations.d.ts +54 -0
- package/templates/mobile/rn/src/modules/home/home.screen.tsx +67 -0
- package/templates/mobile/rn/src/modules/profile/profile.screen.tsx +29 -0
- package/templates/mobile/rn/src/scripts/link-fonts.js +60 -0
- package/templates/mobile/rn/src/scripts/sync-images.js +56 -0
- package/templates/mobile/rn/src/scripts/sync-svgs.js +50 -0
- package/templates/mobile/rn/src/types/models.d.ts +24 -0
- package/templates/mobile/rn/tsconfig.json +21 -0
- package/templates/shared/src/api-endpoints.ts +8 -0
- package/templates/shared/src/enums.ts +34 -0
- package/templates/shared/src/external-urls.ts +5 -0
- package/templates/shared/src/index.ts +6 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const path = require('path')
|
|
3
|
+
|
|
4
|
+
function sync(dir) {
|
|
5
|
+
console.log('*** Sync images ***')
|
|
6
|
+
|
|
7
|
+
const imageDirs = fs
|
|
8
|
+
.readdirSync(dir, {withFileTypes: true})
|
|
9
|
+
.filter(f => f.name.includes('.png') || f.name.includes('.jpg'))
|
|
10
|
+
.map(f => {
|
|
11
|
+
const [fileName, type] = f.name.split('.')
|
|
12
|
+
const [name] = fileName.split('@')
|
|
13
|
+
return `${name}.${type}`
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const imageDirsUnique = [...new Set(imageDirs)]
|
|
17
|
+
|
|
18
|
+
const images = imageDirsUnique.map(imageDir => {
|
|
19
|
+
const parts = imageDir.split('-')
|
|
20
|
+
let name = ''
|
|
21
|
+
for (let i = 0; i < parts.length; i++) {
|
|
22
|
+
name +=
|
|
23
|
+
parts[i][0].toUpperCase() +
|
|
24
|
+
parts[i].substring(1, parts[i].length)
|
|
25
|
+
}
|
|
26
|
+
return 'Img' + name
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const imports = imageDirsUnique.reduce((ret, imageDir, idx) => {
|
|
30
|
+
const [image] = images[idx].split('.')
|
|
31
|
+
return (
|
|
32
|
+
ret +
|
|
33
|
+
`import ${image} from './${imageDir}'` +
|
|
34
|
+
(idx !== imageDirsUnique.length - 1 ? '\n' : '')
|
|
35
|
+
)
|
|
36
|
+
}, '')
|
|
37
|
+
|
|
38
|
+
const exports = images.reduce((ret, img, idx) => {
|
|
39
|
+
const [name] = img.split('.')
|
|
40
|
+
return ret + ` ${name},\n` + (idx === images.length - 1 ? '}\n' : '')
|
|
41
|
+
}, 'export {\n')
|
|
42
|
+
|
|
43
|
+
if (images.length === 0) {
|
|
44
|
+
return '\n// Export\nexport {}'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return `// Image\n${imports}\n\n// Export\n${exports}`
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const imagesPath = path.join(__dirname, '../assets/Images')
|
|
51
|
+
|
|
52
|
+
let output = sync(imagesPath)
|
|
53
|
+
|
|
54
|
+
fs.writeFile(path.join(__dirname, '../assets/Images/index.ts'), output, err =>
|
|
55
|
+
console.log(`Sync images ${err ? 'failed: ' + err : 'succeeded'}`),
|
|
56
|
+
)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const path = require('path')
|
|
3
|
+
|
|
4
|
+
function sync(dir) {
|
|
5
|
+
console.log('*** Sync svgs ***')
|
|
6
|
+
|
|
7
|
+
const svgDirs = fs
|
|
8
|
+
.readdirSync(dir, {
|
|
9
|
+
withFileTypes: true,
|
|
10
|
+
})
|
|
11
|
+
.filter(f => f.name.includes('.svg'))
|
|
12
|
+
.map(f => f.name.split('.')[0])
|
|
13
|
+
|
|
14
|
+
const svgs = svgDirs.map(svgDir => {
|
|
15
|
+
const parts = svgDir.split('-')
|
|
16
|
+
let name = ''
|
|
17
|
+
for (let i = 0; i < parts.length; i++) {
|
|
18
|
+
name +=
|
|
19
|
+
parts[i][0].toUpperCase() +
|
|
20
|
+
parts[i].substring(1, parts[i].length)
|
|
21
|
+
}
|
|
22
|
+
return 'Icon' + name
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const imports = svgDirs.reduce((ret, svgDir, idx) => {
|
|
26
|
+
return (
|
|
27
|
+
ret +
|
|
28
|
+
`import ${svgs[idx]} from './${svgDir}.svg'` +
|
|
29
|
+
(idx !== svgDirs.length - 1 ? '\n' : '')
|
|
30
|
+
)
|
|
31
|
+
}, '')
|
|
32
|
+
|
|
33
|
+
const exports = svgs.reduce((ret, svg, idx) => {
|
|
34
|
+
return ret + ` ${svg},\n` + (idx === svgs.length - 1 ? '}\n' : '')
|
|
35
|
+
}, 'export {\n')
|
|
36
|
+
|
|
37
|
+
if (svgs.length === 0) {
|
|
38
|
+
return '\n// Export\nexport {}'
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return `// Icon\n${imports}\n\n// Export\n${exports}`
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const svgsPath = path.join(__dirname, '../assets/svgs')
|
|
45
|
+
|
|
46
|
+
let output = sync(svgsPath)
|
|
47
|
+
|
|
48
|
+
fs.writeFile(path.join(__dirname, '../assets/svgs/index.ts'), output, err =>
|
|
49
|
+
console.log(`Sync svgs ${err ? 'failed: ' + err : 'succeeded'}`),
|
|
50
|
+
)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// App-wide ambient types that used to live in the project's `model/` layer.
|
|
2
|
+
// Kept minimal here; move real contracts into `@repo/shared` as you build out.
|
|
3
|
+
|
|
4
|
+
/** Standard API envelope returned by ApiService. */
|
|
5
|
+
declare interface IResponse<T = any> {
|
|
6
|
+
data: T;
|
|
7
|
+
message?: string;
|
|
8
|
+
success?: boolean;
|
|
9
|
+
statusCode?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** A file ready for multipart/form-data upload (image picker, etc.). */
|
|
13
|
+
declare interface IMediaFormData {
|
|
14
|
+
uri: string;
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Result of a place/address selection (geo features). */
|
|
20
|
+
declare interface AddressSelectedResult {
|
|
21
|
+
address: string;
|
|
22
|
+
latitude: number;
|
|
23
|
+
longitude: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "expo/tsconfig.base",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"jsx": "react",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"noUnusedLocals": true,
|
|
7
|
+
"noUnusedParameters": true,
|
|
8
|
+
"noImplicitReturns": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"paths": {
|
|
12
|
+
"@src/*": ["./src/*"],
|
|
13
|
+
"@modules/*": ["./src/modules/*"],
|
|
14
|
+
"@repo/shared": ["../../packages/shared/dist/index.d.ts"]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"include": ["src"],
|
|
18
|
+
"exclude": ["node_modules"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
replaceAttrValues: {
|
|
3
|
+
'{currentColor}': '{props.color || "#0D1F2D"}',
|
|
4
|
+
'{292929}': '{props.color || "#292929"}',
|
|
5
|
+
'{D4D4FF}': '{props.color || "#D4D4FF"}',
|
|
6
|
+
'{7C7C7C}': '{props.color || "#7C7C7C"}',
|
|
7
|
+
'{D97706}': '{props.color || "#D97706"}',
|
|
8
|
+
},
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
|
+
ruby ">= 2.6.10"
|
|
5
|
+
|
|
6
|
+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
|
|
7
|
+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
|
|
8
|
+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
|
9
|
+
gem 'xcodeproj', '< 1.26.0'
|
|
10
|
+
gem 'concurrent-ruby', '< 1.3.4'
|
|
11
|
+
|
|
12
|
+
# Ruby 3.4.0 has removed some libraries from the standard library.
|
|
13
|
+
gem 'bigdecimal'
|
|
14
|
+
gem 'logger'
|
|
15
|
+
gem 'benchmark'
|
|
16
|
+
gem 'mutex_m'
|
|
17
|
+
gem 'nkf'
|
|
@@ -1,11 +1,76 @@
|
|
|
1
|
-
#
|
|
1
|
+
# {{PROJECT_NAME}} — Mobile (React Native CLI)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A bare **React Native CLI** starter (no Expo) built from the company's production
|
|
4
|
+
core. Same `src/` architecture and reusable `src/core` kit as the Expo variant —
|
|
5
|
+
only the build tooling differs.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
## Architecture
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
```
|
|
10
|
+
src/
|
|
11
|
+
├── app/ composition: providers, navigation, global stores (auth/loading/common), i18n
|
|
12
|
+
├── core/ reusable infrastructure (API/services, theme, UI kit, forms, hooks, utils)
|
|
13
|
+
├── modules/ your features (home/profile examples included)
|
|
14
|
+
└── assets/ i18n, svgs (sync-generated barrel), images, lotties
|
|
15
|
+
```
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
See the Expo template's README for the full `src/core` breakdown — it is identical.
|
|
18
|
+
|
|
19
|
+
## Expo vs this (bare RN CLI)
|
|
20
|
+
|
|
21
|
+
| | This (RN CLI) | Expo |
|
|
22
|
+
|--|---------------|------|
|
|
23
|
+
| Entry | `AppRegistry.registerComponent` + `app.json` name | `registerRootComponent` |
|
|
24
|
+
| Babel | `module:@react-native/babel-preset` | `babel-preset-expo` |
|
|
25
|
+
| Metro | `@react-native/metro-config` | `expo/metro-config` |
|
|
26
|
+
| TS base | `@react-native/typescript-config` | `expo/tsconfig.base` |
|
|
27
|
+
| Native build | `pod install` + Xcode / Gradle | `expo prebuild` then run |
|
|
28
|
+
|
|
29
|
+
## Shared contracts
|
|
30
|
+
The core imports `ApiEndpoints`, `ExternalUrls`, enums from **`@repo/shared`** —
|
|
31
|
+
generate this app alongside another JS/TS stack; the CLI wires `workspace:*` automatically.
|
|
32
|
+
|
|
33
|
+
## Getting started
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm bootstrap # install + build @repo/shared
|
|
37
|
+
pnpm --filter {{PROJECT_NAME}}-mobile typecheck # verify
|
|
38
|
+
pnpm --filter {{PROJECT_NAME}}-mobile start # metro
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Add an icon: drop `name.svg` in `src/assets/svgs/` then `pnpm --filter {{PROJECT_NAME}}-mobile sync-svgs`.
|
|
42
|
+
|
|
43
|
+
## Native folders (ios / android)
|
|
44
|
+
|
|
45
|
+
Native projects **ship with this template** (RN 0.85.3), so no `prebuild` /
|
|
46
|
+
scaffolding step is needed:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pnpm bootstrap # install
|
|
50
|
+
cd apps/mobile/ios && bundle install && bundle exec pod install && cd -
|
|
51
|
+
pnpm --filter {{PROJECT_NAME}}-mobile ios # or android
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The native app is named **`DuMobile`** with bundle id **`com.dumobile`** (matches
|
|
55
|
+
`app.json` `name`, `AppDelegate` moduleName, and `MainActivity`). **Rename these
|
|
56
|
+
before shipping** (Xcode target/scheme, `app.json` `name`, `android` `applicationId`
|
|
57
|
+
+ `namespace` + the `com/dumobile` Java dir, and `index.js` registration must all match).
|
|
58
|
+
|
|
59
|
+
Monorepo note: under pnpm's hoisted layout the RN packages live in the repo-root
|
|
60
|
+
`node_modules`, not `apps/mobile/node_modules`. So `android/settings.gradle` and
|
|
61
|
+
`android/app/build.gradle` resolve `react-native`, `@react-native/gradle-plugin`
|
|
62
|
+
and `@react-native/codegen` via `node --print require.resolve(...)` (which walks up
|
|
63
|
+
to the root), and the iOS `Podfile` resolves react-native the same way. These
|
|
64
|
+
patches are already applied in the template.
|
|
65
|
+
|
|
66
|
+
## Native library config (already wired)
|
|
67
|
+
|
|
68
|
+
| Library | Status |
|
|
69
|
+
|---------|--------|
|
|
70
|
+
| gesture-handler | imported first in `index.js` ✅ |
|
|
71
|
+
| reanimated | babel plugin set ✅ |
|
|
72
|
+
| svg | metro transformer set ✅ |
|
|
73
|
+
| keyboard-controller / toast | provider + `<Toast>` mounted ✅ |
|
|
74
|
+
| `react-native-config` (.env) | autolinked; if Android doesn't read `.env`, add `apply from: ".../react-native-config/android/dotenv.gradle"` to `android/app/build.gradle` |
|
|
75
|
+
| `react-native-image-picker` | add `NSPhotoLibraryUsageDescription` + `NSCameraUsageDescription` to `ios/DuMobile/Info.plist` and `CAMERA` / `READ_MEDIA_IMAGES` to `AndroidManifest.xml` |
|
|
76
|
+
| `react-native-mmkv` v4 | needs the New Architecture (default on in RN 0.85) |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Native build artifacts
|
|
2
|
+
/ios/Pods/
|
|
3
|
+
/ios/build/
|
|
4
|
+
/android/build/
|
|
5
|
+
/android/app/build/
|
|
6
|
+
/android/.gradle/
|
|
7
|
+
/android/local.properties
|
|
8
|
+
|
|
9
|
+
# Dependencies
|
|
10
|
+
node_modules/
|
|
11
|
+
|
|
12
|
+
# Metro
|
|
13
|
+
.metro-health-check*
|
|
14
|
+
|
|
15
|
+
# Env (keep .env.example)
|
|
16
|
+
.env
|
|
17
|
+
.env.*
|
|
18
|
+
!.env.example
|
|
19
|
+
|
|
20
|
+
# Logs / OS
|
|
21
|
+
*.log
|
|
22
|
+
.DS_Store
|
|
23
|
+
*.keystore
|
|
24
|
+
!debug.keystore
|
|
@@ -2,5 +2,73 @@
|
|
|
2
2
|
"name": "{{PROJECT_NAME}}-mobile",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"private": true,
|
|
5
|
-
"
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "react-native start",
|
|
7
|
+
"start": "react-native start",
|
|
8
|
+
"android": "react-native run-android",
|
|
9
|
+
"ios": "react-native run-ios",
|
|
10
|
+
"lint": "eslint . --ext .ts,.tsx",
|
|
11
|
+
"typecheck": "tsc --noEmit",
|
|
12
|
+
"sync-svgs": "node src/scripts/sync-svgs.js",
|
|
13
|
+
"sync-images": "node src/scripts/sync-images.js"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@hookform/error-message": "2.0.0",
|
|
17
|
+
"@react-native-async-storage/async-storage": "^2.1.2",
|
|
18
|
+
"@react-native-community/netinfo": "^12.0.1",
|
|
19
|
+
"@react-navigation/bottom-tabs": "^7.12.0",
|
|
20
|
+
"@react-navigation/native": "^7.0.13",
|
|
21
|
+
"@react-navigation/native-stack": "^7.1.14",
|
|
22
|
+
"@tanstack/react-query": "^5.101.0",
|
|
23
|
+
"@tanstack/react-query-persist-client": "^5.101.0",
|
|
24
|
+
"axios": "^1.7.9",
|
|
25
|
+
"i18next": "^21.5.4",
|
|
26
|
+
"lodash": "^4.17.21",
|
|
27
|
+
"lottie-react-native": "^7.3.4",
|
|
28
|
+
"qs": "^6.10.1",
|
|
29
|
+
"react": "19.2.3",
|
|
30
|
+
"react-hook-form": "^7.53.2",
|
|
31
|
+
"react-i18next": "^11.14.3",
|
|
32
|
+
"react-native": "0.85.3",
|
|
33
|
+
"react-native-config": "^1.6.1",
|
|
34
|
+
"react-native-date-picker": "5.0.12",
|
|
35
|
+
"react-native-device-info": "^15.0.2",
|
|
36
|
+
"react-native-fast-image": "^8.6.3",
|
|
37
|
+
"react-native-gesture-handler": "~2.31.1",
|
|
38
|
+
"react-native-image-picker": "^8.2.1",
|
|
39
|
+
"react-native-keyboard-controller": "^1.21.6",
|
|
40
|
+
"react-native-linear-gradient": "^2.8.3",
|
|
41
|
+
"react-native-localize": "^3.7.0",
|
|
42
|
+
"react-native-mmkv": "^4.3.1",
|
|
43
|
+
"react-native-nitro-modules": "^0.35.9",
|
|
44
|
+
"react-native-reanimated": "4.3.1",
|
|
45
|
+
"react-native-safe-area-context": "^5.7.0",
|
|
46
|
+
"react-native-screens": "4.25.2",
|
|
47
|
+
"react-native-svg": "^15.15.4",
|
|
48
|
+
"react-native-toast-message": "^2.2.1",
|
|
49
|
+
"react-native-worklets": "0.8.3",
|
|
50
|
+
"yup": "^0.32.11",
|
|
51
|
+
"zustand": "^5.0.7"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@babel/core": "^7.25.2",
|
|
55
|
+
"@babel/preset-env": "^7.25.3",
|
|
56
|
+
"@babel/runtime": "^7.25.0",
|
|
57
|
+
"@react-native-community/cli": "20.1.3",
|
|
58
|
+
"@react-native-community/cli-platform-android": "20.1.3",
|
|
59
|
+
"@react-native-community/cli-platform-ios": "20.1.3",
|
|
60
|
+
"@react-native/babel-preset": "0.85.3",
|
|
61
|
+
"@react-native/eslint-config": "0.85.3",
|
|
62
|
+
"@react-native/gradle-plugin": "0.85.3",
|
|
63
|
+
"@react-native/metro-config": "0.85.3",
|
|
64
|
+
"@react-native/typescript-config": "0.85.3",
|
|
65
|
+
"@types/lodash": "^4.14.176",
|
|
66
|
+
"@types/qs": "^6.9.7",
|
|
67
|
+
"@types/react": "^19.1.1",
|
|
68
|
+
"babel-plugin-module-resolver": "^4.1.0",
|
|
69
|
+
"eslint": "^8.19.0",
|
|
70
|
+
"prettier": "2.8.8",
|
|
71
|
+
"react-native-svg-transformer": "^1.5.0",
|
|
72
|
+
"typescript": "~5.8.3"
|
|
73
|
+
}
|
|
6
74
|
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
apply plugin: "com.android.application"
|
|
2
|
+
apply plugin: "org.jetbrains.kotlin.android"
|
|
3
|
+
apply plugin: "com.facebook.react"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This is the configuration block to customize your React Native Android app.
|
|
7
|
+
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
|
8
|
+
*/
|
|
9
|
+
react {
|
|
10
|
+
// --- pnpm monorepo: resolve RN packages from the repo-root node_modules via Node ---
|
|
11
|
+
def rnPackageJson = ['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()
|
|
12
|
+
def rnDir = new File(rnPackageJson).getParentFile()
|
|
13
|
+
reactNativeDir = rnDir
|
|
14
|
+
cliFile = new File(rnDir, "cli.js")
|
|
15
|
+
codegenDir = new File(['node', '--print', "require.resolve('@react-native/codegen/package.json')"].execute(null, rootDir).text.trim()).getParentFile()
|
|
16
|
+
|
|
17
|
+
/* Folders */
|
|
18
|
+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
|
|
19
|
+
// root = file("../../")
|
|
20
|
+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
|
|
21
|
+
// reactNativeDir = file("../../node_modules/react-native")
|
|
22
|
+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
|
|
23
|
+
// codegenDir = file("../../node_modules/@react-native/codegen")
|
|
24
|
+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
|
|
25
|
+
// cliFile = file("../../node_modules/react-native/cli.js")
|
|
26
|
+
|
|
27
|
+
/* Variants */
|
|
28
|
+
// The list of variants to that are debuggable. For those we're going to
|
|
29
|
+
// skip the bundling of the JS bundle and the assets. Default is "debug", "debugOptimized".
|
|
30
|
+
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
|
31
|
+
// debuggableVariants = ["liteDebug", "liteDebugOptimized", "prodDebug", "prodDebugOptimized"]
|
|
32
|
+
|
|
33
|
+
/* Bundling */
|
|
34
|
+
// A list containing the node command and its flags. Default is just 'node'.
|
|
35
|
+
// nodeExecutableAndArgs = ["node"]
|
|
36
|
+
//
|
|
37
|
+
// The command to run when bundling. By default is 'bundle'
|
|
38
|
+
// bundleCommand = "ram-bundle"
|
|
39
|
+
//
|
|
40
|
+
// The path to the CLI configuration file. Default is empty.
|
|
41
|
+
// bundleConfig = file(../rn-cli.config.js)
|
|
42
|
+
//
|
|
43
|
+
// The name of the generated asset file containing your JS bundle
|
|
44
|
+
// bundleAssetName = "MyApplication.android.bundle"
|
|
45
|
+
//
|
|
46
|
+
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
|
47
|
+
// entryFile = file("../js/MyApplication.android.js")
|
|
48
|
+
//
|
|
49
|
+
// A list of extra flags to pass to the 'bundle' commands.
|
|
50
|
+
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
51
|
+
// extraPackagerArgs = []
|
|
52
|
+
|
|
53
|
+
/* Hermes Commands */
|
|
54
|
+
// The hermes compiler command to run. By default it is 'hermesc'
|
|
55
|
+
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
|
56
|
+
//
|
|
57
|
+
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
58
|
+
// hermesFlags = ["-O", "-output-source-map"]
|
|
59
|
+
|
|
60
|
+
/* Autolinking */
|
|
61
|
+
autolinkLibrariesWithApp()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
|
66
|
+
*/
|
|
67
|
+
def enableProguardInReleaseBuilds = false
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The preferred build flavor of JavaScriptCore (JSC)
|
|
71
|
+
*
|
|
72
|
+
* For example, to use the international variant, you can use:
|
|
73
|
+
* `def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
|
|
74
|
+
*
|
|
75
|
+
* The international variant includes ICU i18n library and necessary data
|
|
76
|
+
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
77
|
+
* give correct results when using with locales other than en-US. Note that
|
|
78
|
+
* this variant is about 6MiB larger per architecture than default.
|
|
79
|
+
*/
|
|
80
|
+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
|
|
81
|
+
|
|
82
|
+
android {
|
|
83
|
+
ndkVersion rootProject.ext.ndkVersion
|
|
84
|
+
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
85
|
+
compileSdk rootProject.ext.compileSdkVersion
|
|
86
|
+
|
|
87
|
+
namespace "com.dumobile"
|
|
88
|
+
defaultConfig {
|
|
89
|
+
applicationId "com.dumobile"
|
|
90
|
+
minSdkVersion rootProject.ext.minSdkVersion
|
|
91
|
+
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
92
|
+
versionCode 1
|
|
93
|
+
versionName "1.0"
|
|
94
|
+
}
|
|
95
|
+
signingConfigs {
|
|
96
|
+
debug {
|
|
97
|
+
storeFile file('debug.keystore')
|
|
98
|
+
storePassword 'android'
|
|
99
|
+
keyAlias 'androiddebugkey'
|
|
100
|
+
keyPassword 'android'
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
buildTypes {
|
|
104
|
+
debug {
|
|
105
|
+
signingConfig signingConfigs.debug
|
|
106
|
+
}
|
|
107
|
+
release {
|
|
108
|
+
// Caution! In production, you need to generate your own keystore file.
|
|
109
|
+
// see https://reactnative.dev/docs/signed-apk-android.
|
|
110
|
+
signingConfig signingConfigs.debug
|
|
111
|
+
minifyEnabled enableProguardInReleaseBuilds
|
|
112
|
+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
dependencies {
|
|
118
|
+
// The version of react-native is set by the React Native Gradle Plugin
|
|
119
|
+
implementation("com.facebook.react:react-android")
|
|
120
|
+
|
|
121
|
+
if (hermesEnabled.toBoolean()) {
|
|
122
|
+
implementation("com.facebook.react:hermes-android")
|
|
123
|
+
} else {
|
|
124
|
+
implementation jscFlavor
|
|
125
|
+
}
|
|
126
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Add project specific ProGuard rules here.
|
|
2
|
+
# By default, the flags in this file are appended to flags specified
|
|
3
|
+
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
|
4
|
+
# You can edit the include path and order by changing the proguardFiles
|
|
5
|
+
# directive in build.gradle.
|
|
6
|
+
#
|
|
7
|
+
# For more details, see
|
|
8
|
+
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
9
|
+
|
|
10
|
+
# Add any project specific keep options here:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
+
|
|
3
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
4
|
+
|
|
5
|
+
<application
|
|
6
|
+
android:name=".MainApplication"
|
|
7
|
+
android:label="@string/app_name"
|
|
8
|
+
android:icon="@mipmap/ic_launcher"
|
|
9
|
+
android:roundIcon="@mipmap/ic_launcher_round"
|
|
10
|
+
android:allowBackup="false"
|
|
11
|
+
android:theme="@style/AppTheme"
|
|
12
|
+
android:usesCleartextTraffic="${usesCleartextTraffic}"
|
|
13
|
+
android:supportsRtl="true">
|
|
14
|
+
<activity
|
|
15
|
+
android:name=".MainActivity"
|
|
16
|
+
android:label="@string/app_name"
|
|
17
|
+
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
|
|
18
|
+
android:launchMode="singleTask"
|
|
19
|
+
android:windowSoftInputMode="adjustResize"
|
|
20
|
+
android:exported="true">
|
|
21
|
+
<intent-filter>
|
|
22
|
+
<action android:name="android.intent.action.MAIN" />
|
|
23
|
+
<category android:name="android.intent.category.LAUNCHER" />
|
|
24
|
+
</intent-filter>
|
|
25
|
+
</activity>
|
|
26
|
+
</application>
|
|
27
|
+
</manifest>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
package com.dumobile
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.ReactActivity
|
|
4
|
+
import com.facebook.react.ReactActivityDelegate
|
|
5
|
+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
|
6
|
+
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
|
7
|
+
|
|
8
|
+
class MainActivity : ReactActivity() {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
|
12
|
+
* rendering of the component.
|
|
13
|
+
*/
|
|
14
|
+
override fun getMainComponentName(): String = "DuMobile"
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
|
|
18
|
+
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
|
|
19
|
+
*/
|
|
20
|
+
override fun createReactActivityDelegate(): ReactActivityDelegate =
|
|
21
|
+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
package com.dumobile
|
|
2
|
+
|
|
3
|
+
import android.app.Application
|
|
4
|
+
import com.facebook.react.PackageList
|
|
5
|
+
import com.facebook.react.ReactApplication
|
|
6
|
+
import com.facebook.react.ReactHost
|
|
7
|
+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
|
|
8
|
+
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
|
9
|
+
|
|
10
|
+
class MainApplication : Application(), ReactApplication {
|
|
11
|
+
|
|
12
|
+
override val reactHost: ReactHost by lazy {
|
|
13
|
+
getDefaultReactHost(
|
|
14
|
+
context = applicationContext,
|
|
15
|
+
packageList =
|
|
16
|
+
PackageList(this).packages.apply {
|
|
17
|
+
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
18
|
+
// add(MyReactNativePackage())
|
|
19
|
+
},
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
override fun onCreate() {
|
|
24
|
+
super.onCreate()
|
|
25
|
+
loadReactNative(this)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
-->
|
|
16
|
+
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
|
17
|
+
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
|
18
|
+
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
|
19
|
+
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
|
20
|
+
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
|
|
21
|
+
>
|
|
22
|
+
|
|
23
|
+
<selector>
|
|
24
|
+
<!--
|
|
25
|
+
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
|
26
|
+
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
|
27
|
+
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
|
28
|
+
|
|
29
|
+
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
30
|
+
|
|
31
|
+
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
|
32
|
+
-->
|
|
33
|
+
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
34
|
+
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
|
35
|
+
</selector>
|
|
36
|
+
|
|
37
|
+
</inset>
|
|
Binary file
|