nwui-cli 0.4.1-staging.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +2 -1
- package/build/index.js +33 -17
- package/build/install-component.js +105 -48
- package/build/login.js +14 -11
- package/build/utils/env.js +2 -2
- package/package.json +2 -1
- package/build/cli/src/index.js +0 -41
- package/build/cli/src/install-component.js +0 -42
- package/build/cli/src/login.js +0 -77
- package/build/cli/src/net.js +0 -12
- package/build/cli/src/project-setup.js +0 -1
- package/build/cli/src/prompts.js +0 -119
- package/build/cli/src/utils/local-storage.js +0 -19
- package/build/docs/app/data.js +0 -1380
- package/build/log/index.js +0 -81
- package/build/prompts.js +0 -119
- package/my-expo-app-2/app/+html.tsx +0 -46
- package/my-expo-app-2/app/+not-found.tsx +0 -33
- package/my-expo-app-2/app/_layout.tsx +0 -22
- package/my-expo-app-2/app/details.tsx +0 -17
- package/my-expo-app-2/app/index.tsx +0 -23
- package/my-expo-app-2/app-env.d.ts +0 -2
- package/my-expo-app-2/app.json +0 -48
- package/my-expo-app-2/assets/adaptive-icon.png +0 -0
- package/my-expo-app-2/assets/favicon.png +0 -0
- package/my-expo-app-2/assets/icon.png +0 -0
- package/my-expo-app-2/assets/splash.png +0 -0
- package/my-expo-app-2/babel.config.js +0 -18
- package/my-expo-app-2/cesconfig.json +0 -35
- package/my-expo-app-2/components/Button.tsx +0 -19
- package/my-expo-app-2/components/Container.tsx +0 -9
- package/my-expo-app-2/components/EditScreenInfo.tsx +0 -34
- package/my-expo-app-2/components/ScreenContent.tsx +0 -25
- package/my-expo-app-2/components/nativewindui/ActivityIndicator.tsx +0 -13
- package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.ios.tsx +0 -97
- package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.tsx +0 -264
- package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/index.ts +0 -1
- package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/types.ts +0 -95
- package/my-expo-app-2/components/nativewindui/Alert/Alert.ios.tsx +0 -65
- package/my-expo-app-2/components/nativewindui/Alert/Alert.tsx +0 -291
- package/my-expo-app-2/components/nativewindui/Alert/index.ts +0 -1
- package/my-expo-app-2/components/nativewindui/Alert/types.ts +0 -27
- package/my-expo-app-2/components/nativewindui/Badge.tsx +0 -84
- package/my-expo-app-2/components/nativewindui/Button.tsx +0 -156
- package/my-expo-app-2/components/nativewindui/Checkbox.tsx +0 -61
- package/my-expo-app-2/components/nativewindui/ContextMenu/ContextMenu.ios.tsx +0 -221
- package/my-expo-app-2/components/nativewindui/ContextMenu/ContextMenu.tsx +0 -420
- package/my-expo-app-2/components/nativewindui/ContextMenu/index.ts +0 -1
- package/my-expo-app-2/components/nativewindui/ContextMenu/types.ts +0 -91
- package/my-expo-app-2/components/nativewindui/ContextMenu/utils.ts +0 -14
- package/my-expo-app-2/components/nativewindui/DrawerContent.tsx +0 -145
- package/my-expo-app-2/components/nativewindui/DropdownMenu/DropdownMenu.ios.tsx +0 -168
- package/my-expo-app-2/components/nativewindui/DropdownMenu/DropdownMenu.tsx +0 -330
- package/my-expo-app-2/components/nativewindui/DropdownMenu/index.ts +0 -1
- package/my-expo-app-2/components/nativewindui/DropdownMenu/types.ts +0 -93
- package/my-expo-app-2/components/nativewindui/DropdownMenu/utils.ts +0 -14
- package/my-expo-app-2/components/nativewindui/Form.tsx +0 -125
- package/my-expo-app-2/components/nativewindui/LargeTitleHeader/LargeTitleHeader.ios.tsx +0 -99
- package/my-expo-app-2/components/nativewindui/LargeTitleHeader/LargeTitleHeader.tsx +0 -288
- package/my-expo-app-2/components/nativewindui/LargeTitleHeader/index.ts +0 -1
- package/my-expo-app-2/components/nativewindui/LargeTitleHeader/types.ts +0 -89
- package/my-expo-app-2/components/nativewindui/List.tsx +0 -433
- package/my-expo-app-2/components/nativewindui/SearchInput/SearchInput.ios.tsx +0 -177
- package/my-expo-app-2/components/nativewindui/SearchInput/SearchInput.tsx +0 -86
- package/my-expo-app-2/components/nativewindui/SearchInput/index.tsx +0 -1
- package/my-expo-app-2/components/nativewindui/SearchInput/types.ts +0 -12
- package/my-expo-app-2/components/nativewindui/SegmentedControl/SegmentedControl.ios.tsx +0 -31
- package/my-expo-app-2/components/nativewindui/SegmentedControl/SegmentedControl.tsx +0 -55
- package/my-expo-app-2/components/nativewindui/SegmentedControl/index.ts +0 -1
- package/my-expo-app-2/components/nativewindui/SegmentedControl/types.ts +0 -15
- package/my-expo-app-2/components/nativewindui/Stepper.tsx +0 -62
- package/my-expo-app-2/components/nativewindui/Text.tsx +0 -55
- package/my-expo-app-2/components/nativewindui/TextField/TextField.ios.tsx +0 -85
- package/my-expo-app-2/components/nativewindui/TextField/TextField.tsx +0 -326
- package/my-expo-app-2/components/nativewindui/TextField/index.tsx +0 -1
- package/my-expo-app-2/components/nativewindui/TextField/types.ts +0 -26
- package/my-expo-app-2/components/nativewindui/Toolbar.tsx +0 -116
- package/my-expo-app-2/global.css +0 -3
- package/my-expo-app-2/metro.config.js +0 -12
- package/my-expo-app-2/package-lock.json +0 -19162
- package/my-expo-app-2/package.json +0 -74
- package/my-expo-app-2/prettier.config.js +0 -11
- package/my-expo-app-2/tailwind.config.js +0 -11
- package/my-expo-app-3/app/+html.tsx +0 -46
- package/my-expo-app-3/app/+not-found.tsx +0 -33
- package/my-expo-app-3/app/_layout.tsx +0 -22
- package/my-expo-app-3/app/details.tsx +0 -17
- package/my-expo-app-3/app/index.tsx +0 -23
- package/my-expo-app-3/app-env.d.ts +0 -2
- package/my-expo-app-3/app.json +0 -48
- package/my-expo-app-3/assets/adaptive-icon.png +0 -0
- package/my-expo-app-3/assets/favicon.png +0 -0
- package/my-expo-app-3/assets/icon.png +0 -0
- package/my-expo-app-3/assets/splash.png +0 -0
- package/my-expo-app-3/babel.config.js +0 -18
- package/my-expo-app-3/cesconfig.json +0 -35
- package/my-expo-app-3/components/Button.tsx +0 -19
- package/my-expo-app-3/components/Container.tsx +0 -9
- package/my-expo-app-3/components/EditScreenInfo.tsx +0 -34
- package/my-expo-app-3/components/ScreenContent.tsx +0 -25
- package/my-expo-app-3/components/nativewindui/ActivityIndicator.tsx +0 -13
- package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.ios.tsx +0 -97
- package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.tsx +0 -264
- package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/index.ts +0 -1
- package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/types.ts +0 -95
- package/my-expo-app-3/components/nativewindui/Alert/Alert.ios.tsx +0 -65
- package/my-expo-app-3/components/nativewindui/Alert/Alert.tsx +0 -291
- package/my-expo-app-3/components/nativewindui/Alert/index.ts +0 -1
- package/my-expo-app-3/components/nativewindui/Alert/types.ts +0 -27
- package/my-expo-app-3/components/nativewindui/Badge.tsx +0 -84
- package/my-expo-app-3/components/nativewindui/Button.tsx +0 -156
- package/my-expo-app-3/components/nativewindui/Checkbox.tsx +0 -61
- package/my-expo-app-3/components/nativewindui/ContextMenu/ContextMenu.ios.tsx +0 -221
- package/my-expo-app-3/components/nativewindui/ContextMenu/ContextMenu.tsx +0 -420
- package/my-expo-app-3/components/nativewindui/ContextMenu/index.ts +0 -1
- package/my-expo-app-3/components/nativewindui/ContextMenu/types.ts +0 -91
- package/my-expo-app-3/components/nativewindui/ContextMenu/utils.ts +0 -14
- package/my-expo-app-3/components/nativewindui/DrawerContent.tsx +0 -145
- package/my-expo-app-3/components/nativewindui/DropdownMenu/DropdownMenu.ios.tsx +0 -168
- package/my-expo-app-3/components/nativewindui/DropdownMenu/DropdownMenu.tsx +0 -330
- package/my-expo-app-3/components/nativewindui/DropdownMenu/index.ts +0 -1
- package/my-expo-app-3/components/nativewindui/DropdownMenu/types.ts +0 -93
- package/my-expo-app-3/components/nativewindui/DropdownMenu/utils.ts +0 -14
- package/my-expo-app-3/components/nativewindui/Form.tsx +0 -125
- package/my-expo-app-3/components/nativewindui/LargeTitleHeader/LargeTitleHeader.ios.tsx +0 -99
- package/my-expo-app-3/components/nativewindui/LargeTitleHeader/LargeTitleHeader.tsx +0 -288
- package/my-expo-app-3/components/nativewindui/LargeTitleHeader/index.ts +0 -1
- package/my-expo-app-3/components/nativewindui/LargeTitleHeader/types.ts +0 -89
- package/my-expo-app-3/components/nativewindui/List.tsx +0 -433
- package/my-expo-app-3/components/nativewindui/SearchInput/SearchInput.ios.tsx +0 -177
- package/my-expo-app-3/components/nativewindui/SearchInput/SearchInput.tsx +0 -86
- package/my-expo-app-3/components/nativewindui/SearchInput/index.tsx +0 -1
- package/my-expo-app-3/components/nativewindui/SearchInput/types.ts +0 -12
- package/my-expo-app-3/components/nativewindui/SegmentedControl/SegmentedControl.ios.tsx +0 -31
- package/my-expo-app-3/components/nativewindui/SegmentedControl/SegmentedControl.tsx +0 -55
- package/my-expo-app-3/components/nativewindui/SegmentedControl/index.ts +0 -1
- package/my-expo-app-3/components/nativewindui/SegmentedControl/types.ts +0 -15
- package/my-expo-app-3/components/nativewindui/Stepper.tsx +0 -62
- package/my-expo-app-3/components/nativewindui/Text.tsx +0 -55
- package/my-expo-app-3/components/nativewindui/TextField/TextField.ios.tsx +0 -85
- package/my-expo-app-3/components/nativewindui/TextField/TextField.tsx +0 -326
- package/my-expo-app-3/components/nativewindui/TextField/index.tsx +0 -1
- package/my-expo-app-3/components/nativewindui/TextField/types.ts +0 -26
- package/my-expo-app-3/components/nativewindui/Toolbar.tsx +0 -116
- package/my-expo-app-3/components/nativewindui/examples/selectable-text.tsx +0 -43
- package/my-expo-app-3/components/nativewindui/examples/text.tsx +0 -43
- package/my-expo-app-3/global.css +0 -3
- package/my-expo-app-3/metro.config.js +0 -12
- package/my-expo-app-3/package-lock.json +0 -19141
- package/my-expo-app-3/package.json +0 -73
- package/my-expo-app-3/prettier.config.js +0 -11
- package/my-expo-app-3/tailwind.config.js +0 -11
- package/my-expo-app-test-case/app/+html.tsx +0 -46
- package/my-expo-app-test-case/app/+not-found.tsx +0 -33
- package/my-expo-app-test-case/app/_layout.tsx +0 -22
- package/my-expo-app-test-case/app/details.tsx +0 -17
- package/my-expo-app-test-case/app/index.tsx +0 -23
- package/my-expo-app-test-case/app-env.d.ts +0 -2
- package/my-expo-app-test-case/app.json +0 -48
- package/my-expo-app-test-case/assets/adaptive-icon.png +0 -0
- package/my-expo-app-test-case/assets/favicon.png +0 -0
- package/my-expo-app-test-case/assets/icon.png +0 -0
- package/my-expo-app-test-case/assets/splash.png +0 -0
- package/my-expo-app-test-case/babel.config.js +0 -18
- package/my-expo-app-test-case/cesconfig.json +0 -35
- package/my-expo-app-test-case/components/Button.tsx +0 -19
- package/my-expo-app-test-case/components/Container.tsx +0 -9
- package/my-expo-app-test-case/components/EditScreenInfo.tsx +0 -34
- package/my-expo-app-test-case/components/ScreenContent.tsx +0 -25
- package/my-expo-app-test-case/components/nativewindui/ActivityIndicator.tsx +0 -13
- package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.ios.tsx +0 -97
- package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.tsx +0 -264
- package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/index.ts +0 -1
- package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/types.ts +0 -95
- package/my-expo-app-test-case/components/nativewindui/Alert/Alert.ios.tsx +0 -65
- package/my-expo-app-test-case/components/nativewindui/Alert/Alert.tsx +0 -291
- package/my-expo-app-test-case/components/nativewindui/Alert/index.ts +0 -1
- package/my-expo-app-test-case/components/nativewindui/Alert/types.ts +0 -27
- package/my-expo-app-test-case/components/nativewindui/Badge.tsx +0 -84
- package/my-expo-app-test-case/components/nativewindui/Button.tsx +0 -156
- package/my-expo-app-test-case/components/nativewindui/Checkbox.tsx +0 -61
- package/my-expo-app-test-case/components/nativewindui/ContextMenu/ContextMenu.ios.tsx +0 -221
- package/my-expo-app-test-case/components/nativewindui/ContextMenu/ContextMenu.tsx +0 -420
- package/my-expo-app-test-case/components/nativewindui/ContextMenu/index.ts +0 -1
- package/my-expo-app-test-case/components/nativewindui/ContextMenu/types.ts +0 -91
- package/my-expo-app-test-case/components/nativewindui/ContextMenu/utils.ts +0 -14
- package/my-expo-app-test-case/components/nativewindui/DrawerContent.tsx +0 -145
- package/my-expo-app-test-case/components/nativewindui/DropdownMenu/DropdownMenu.ios.tsx +0 -168
- package/my-expo-app-test-case/components/nativewindui/DropdownMenu/DropdownMenu.tsx +0 -330
- package/my-expo-app-test-case/components/nativewindui/DropdownMenu/index.ts +0 -1
- package/my-expo-app-test-case/components/nativewindui/DropdownMenu/types.ts +0 -93
- package/my-expo-app-test-case/components/nativewindui/DropdownMenu/utils.ts +0 -14
- package/my-expo-app-test-case/components/nativewindui/Form.tsx +0 -125
- package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/LargeTitleHeader.ios.tsx +0 -99
- package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/LargeTitleHeader.tsx +0 -288
- package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/index.ts +0 -1
- package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/types.ts +0 -89
- package/my-expo-app-test-case/components/nativewindui/List.tsx +0 -433
- package/my-expo-app-test-case/components/nativewindui/SearchInput/SearchInput.ios.tsx +0 -177
- package/my-expo-app-test-case/components/nativewindui/SearchInput/SearchInput.tsx +0 -86
- package/my-expo-app-test-case/components/nativewindui/SearchInput/index.tsx +0 -1
- package/my-expo-app-test-case/components/nativewindui/SearchInput/types.ts +0 -12
- package/my-expo-app-test-case/components/nativewindui/SegmentedControl/SegmentedControl.ios.tsx +0 -31
- package/my-expo-app-test-case/components/nativewindui/SegmentedControl/SegmentedControl.tsx +0 -55
- package/my-expo-app-test-case/components/nativewindui/SegmentedControl/index.ts +0 -1
- package/my-expo-app-test-case/components/nativewindui/SegmentedControl/types.ts +0 -15
- package/my-expo-app-test-case/components/nativewindui/Stepper.tsx +0 -62
- package/my-expo-app-test-case/components/nativewindui/Text.tsx +0 -55
- package/my-expo-app-test-case/components/nativewindui/TextField/TextField.ios.tsx +0 -85
- package/my-expo-app-test-case/components/nativewindui/TextField/TextField.tsx +0 -326
- package/my-expo-app-test-case/components/nativewindui/TextField/index.tsx +0 -1
- package/my-expo-app-test-case/components/nativewindui/TextField/types.ts +0 -26
- package/my-expo-app-test-case/components/nativewindui/Toolbar.tsx +0 -116
- package/my-expo-app-test-case/components/nativewindui/examples/a-user-created-file.tsx +0 -0
- package/my-expo-app-test-case/components/nativewindui/examples/selectable-text.tsx +0 -43
- package/my-expo-app-test-case/components/nativewindui/examples/text.tsx +0 -43
- package/my-expo-app-test-case/global.css +0 -3
- package/my-expo-app-test-case/metro.config.js +0 -12
- package/my-expo-app-test-case/package-lock.json +0 -19141
- package/my-expo-app-test-case/package.json +0 -73
- package/my-expo-app-test-case/prettier.config.js +0 -11
- package/my-expo-app-test-case/tailwind.config.js +0 -11
- package/no-install/app/+html.tsx +0 -46
- package/no-install/app/+not-found.tsx +0 -25
- package/no-install/app/_layout.tsx +0 -7
- package/no-install/app/details.tsx +0 -20
- package/no-install/app/index.tsx +0 -19
- package/no-install/app-env.d.ts +0 -2
- package/no-install/app.json +0 -41
- package/no-install/assets/adaptive-icon.png +0 -0
- package/no-install/assets/favicon.png +0 -0
- package/no-install/assets/icon.png +0 -0
- package/no-install/assets/splash.png +0 -0
- package/no-install/babel.config.js +0 -13
- package/no-install/cesconfig.json +0 -35
- package/no-install/components/Button.tsx +0 -25
- package/no-install/components/Container.tsx +0 -9
- package/no-install/components/EditScreenInfo.tsx +0 -31
- package/no-install/components/ScreenContent.tsx +0 -29
- package/no-install/components/nativewindui/Slider.tsx +0 -26
- package/no-install/global.css +0 -3
- package/no-install/metro.config.js +0 -10
- package/no-install/package-lock.json +0 -17505
- package/no-install/package.json +0 -59
- package/no-install/prettier.config.js +0 -10
- package/no-install/tailwind.config.js +0 -14
- package/test-app/app/+html.tsx +0 -46
- package/test-app/app/+not-found.tsx +0 -25
- package/test-app/app/_layout.tsx +0 -7
- package/test-app/app/details.tsx +0 -20
- package/test-app/app/index.tsx +0 -19
- package/test-app/app-env.d.ts +0 -2
- package/test-app/app.json +0 -41
- package/test-app/assets/adaptive-icon.png +0 -0
- package/test-app/assets/favicon.png +0 -0
- package/test-app/assets/icon.png +0 -0
- package/test-app/assets/splash.png +0 -0
- package/test-app/babel.config.js +0 -13
- package/test-app/cesconfig.json +0 -35
- package/test-app/components/Button.tsx +0 -25
- package/test-app/components/Container.tsx +0 -9
- package/test-app/components/EditScreenInfo.tsx +0 -31
- package/test-app/components/ScreenContent.tsx +0 -29
- package/test-app/components/nativewindui/ActivityIndicator.tsx +0 -13
- package/test-app/components/nativewindui/Avatar.tsx +0 -133
- package/test-app/components/nativewindui/DatePicker/DatePicker.android.tsx +0 -72
- package/test-app/components/nativewindui/DatePicker/DatePicker.tsx +0 -23
- package/test-app/components/nativewindui/DatePicker/index.ts +0 -1
- package/test-app/components/nativewindui/Picker.tsx +0 -42
- package/test-app/components/nativewindui/ProgressIndicator.tsx +0 -78
- package/test-app/components/nativewindui/Sheet.tsx +0 -52
- package/test-app/components/nativewindui/Slider.tsx +0 -26
- package/test-app/components/nativewindui/Text.tsx +0 -55
- package/test-app/components/nativewindui/Toggle.tsx +0 -20
- package/test-app/global.css +0 -3
- package/test-app/metro.config.js +0 -10
- package/test-app/package.json +0 -64
- package/test-app/prettier.config.js +0 -10
- package/test-app/tailwind.config.js +0 -14
- package/test-no-install/app/+html.tsx +0 -46
- package/test-no-install/app/+not-found.tsx +0 -25
- package/test-no-install/app/_layout.tsx +0 -7
- package/test-no-install/app/details.tsx +0 -20
- package/test-no-install/app/index.tsx +0 -19
- package/test-no-install/app-env.d.ts +0 -2
- package/test-no-install/app.json +0 -41
- package/test-no-install/assets/adaptive-icon.png +0 -0
- package/test-no-install/assets/favicon.png +0 -0
- package/test-no-install/assets/icon.png +0 -0
- package/test-no-install/assets/splash.png +0 -0
- package/test-no-install/babel.config.js +0 -13
- package/test-no-install/cesconfig.json +0 -35
- package/test-no-install/components/Button.tsx +0 -25
- package/test-no-install/components/Container.tsx +0 -9
- package/test-no-install/components/EditScreenInfo.tsx +0 -31
- package/test-no-install/components/ScreenContent.tsx +0 -29
- package/test-no-install/components/nativewindui/ActivityIndicator.tsx +0 -13
- package/test-no-install/components/nativewindui/Avatar.tsx +0 -133
- package/test-no-install/components/nativewindui/DatePicker/DatePicker.android.tsx +0 -72
- package/test-no-install/components/nativewindui/DatePicker/DatePicker.tsx +0 -23
- package/test-no-install/components/nativewindui/DatePicker/index.ts +0 -1
- package/test-no-install/components/nativewindui/Picker.tsx +0 -42
- package/test-no-install/components/nativewindui/ProgressIndicator.tsx +0 -78
- package/test-no-install/components/nativewindui/Sheet.tsx +0 -52
- package/test-no-install/components/nativewindui/Slider.tsx +0 -26
- package/test-no-install/components/nativewindui/Text.tsx +0 -55
- package/test-no-install/components/nativewindui/Toggle.tsx +0 -20
- package/test-no-install/global.css +0 -3
- package/test-no-install/metro.config.js +0 -10
- package/test-no-install/package.json +0 -64
- package/test-no-install/prettier.config.js +0 -10
- package/test-no-install/tailwind.config.js +0 -14
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Text, View } from "react-native";
|
|
2
|
-
|
|
3
|
-
export const EditScreenInfo = ({ path }: { path: string }) => {
|
|
4
|
-
const title = "Open up the code for this screen:";
|
|
5
|
-
const description =
|
|
6
|
-
"Change any of the text, save the file, and your app will automatically update.";
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<View>
|
|
10
|
-
<View className={styles.getStartedContainer}>
|
|
11
|
-
<Text className={styles.getStartedText}>{title}</Text>
|
|
12
|
-
<View
|
|
13
|
-
className={styles.codeHighlightContainer + styles.homeScreenFilename}
|
|
14
|
-
>
|
|
15
|
-
<Text>{path}</Text>
|
|
16
|
-
</View>
|
|
17
|
-
<Text className={styles.getStartedText}>{description}</Text>
|
|
18
|
-
</View>
|
|
19
|
-
</View>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const styles = {
|
|
24
|
-
codeHighlightContainer: `rounded-md px-1`,
|
|
25
|
-
getStartedContainer: `items-center mx-12`,
|
|
26
|
-
getStartedText: `text-lg leading-6 text-center`,
|
|
27
|
-
helpContainer: `items-center mx-5 mt-4`,
|
|
28
|
-
helpLink: `py-4`,
|
|
29
|
-
helpLinkText: `text-center`,
|
|
30
|
-
homeScreenFilename: `my-2`,
|
|
31
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Text, View } from "react-native";
|
|
2
|
-
|
|
3
|
-
import { EditScreenInfo } from "./EditScreenInfo";
|
|
4
|
-
|
|
5
|
-
type ScreenContentProps = {
|
|
6
|
-
title: string;
|
|
7
|
-
path: string;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const ScreenContent = ({
|
|
12
|
-
title,
|
|
13
|
-
path,
|
|
14
|
-
children,
|
|
15
|
-
}: ScreenContentProps) => {
|
|
16
|
-
return (
|
|
17
|
-
<View className={styles.container}>
|
|
18
|
-
<Text className={styles.title}>{title}</Text>
|
|
19
|
-
<View className={styles.separator} />
|
|
20
|
-
<EditScreenInfo path={path} />
|
|
21
|
-
{children}
|
|
22
|
-
</View>
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
const styles = {
|
|
26
|
-
container: `items-center flex-1 justify-center`,
|
|
27
|
-
separator: `h-[1px] my-7 w-4/5 bg-gray-200`,
|
|
28
|
-
title: `text-xl font-bold`,
|
|
29
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ActivityIndicator as RNActivityIndicator } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { useColorScheme } from '~/lib/useColorScheme';
|
|
5
|
-
|
|
6
|
-
function ActivityIndicator(
|
|
7
|
-
props: React.ComponentPropsWithoutRef<typeof RNActivityIndicator>
|
|
8
|
-
) {
|
|
9
|
-
const { colors } = useColorScheme();
|
|
10
|
-
return <RNActivityIndicator color={colors.primary} {...props} />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { ActivityIndicator }
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
ImageErrorEventData,
|
|
4
|
-
ImageLoadEventData,
|
|
5
|
-
NativeSyntheticEvent,
|
|
6
|
-
Image as RNImage,
|
|
7
|
-
View,
|
|
8
|
-
} from 'react-native';
|
|
9
|
-
|
|
10
|
-
import { cn } from '~/lib/cn';
|
|
11
|
-
|
|
12
|
-
interface AvatarRootProps {
|
|
13
|
-
alt: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface AvatarImageProps {
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
onLoadingStatusChange?: (status: 'error' | 'loaded') => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
type AvatarState = 'loading' | 'error' | 'loaded';
|
|
22
|
-
|
|
23
|
-
interface IRootContext extends AvatarRootProps {
|
|
24
|
-
status: AvatarState;
|
|
25
|
-
setStatus: (status: AvatarState) => void;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const RootContext = React.createContext<IRootContext | null>(null);
|
|
29
|
-
|
|
30
|
-
const Avatar = React.forwardRef<
|
|
31
|
-
React.ElementRef<typeof View>,
|
|
32
|
-
React.ComponentPropsWithoutRef<typeof View> & AvatarRootProps
|
|
33
|
-
>(({ alt, className, ...viewProps }, ref) => {
|
|
34
|
-
const [status, setStatus] = React.useState<AvatarState>('error');
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<RootContext.Provider value={{ alt, status, setStatus }}>
|
|
38
|
-
<View
|
|
39
|
-
ref={ref}
|
|
40
|
-
className={cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className)}
|
|
41
|
-
{...viewProps}
|
|
42
|
-
/>
|
|
43
|
-
</RootContext.Provider>
|
|
44
|
-
);
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
Avatar.displayName = 'Avatar';
|
|
48
|
-
|
|
49
|
-
function useRootContext() {
|
|
50
|
-
const context = React.useContext(RootContext);
|
|
51
|
-
if (!context) {
|
|
52
|
-
throw new Error('Avatar compound components cannot be rendered outside the Avatar component');
|
|
53
|
-
}
|
|
54
|
-
return context;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const AvatarImage = React.forwardRef<
|
|
58
|
-
React.ElementRef<typeof RNImage>,
|
|
59
|
-
Omit<React.ComponentPropsWithoutRef<typeof RNImage>, 'alt'> & AvatarImageProps
|
|
60
|
-
>(
|
|
61
|
-
(
|
|
62
|
-
{ onLoad: onLoadProps, onError: onErrorProps, onLoadingStatusChange, className, ...props },
|
|
63
|
-
ref
|
|
64
|
-
) => {
|
|
65
|
-
const { alt, setStatus, status } = useRootContext();
|
|
66
|
-
|
|
67
|
-
React.useLayoutEffect(() => {
|
|
68
|
-
setStatus('loading');
|
|
69
|
-
}, []);
|
|
70
|
-
|
|
71
|
-
const onLoad = React.useCallback(
|
|
72
|
-
(e: NativeSyntheticEvent<ImageLoadEventData>) => {
|
|
73
|
-
setStatus('loaded');
|
|
74
|
-
onLoadingStatusChange?.('loaded');
|
|
75
|
-
onLoadProps?.(e);
|
|
76
|
-
},
|
|
77
|
-
[onLoadProps]
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
const onError = React.useCallback(
|
|
81
|
-
(e: NativeSyntheticEvent<ImageErrorEventData>) => {
|
|
82
|
-
setStatus('error');
|
|
83
|
-
onLoadingStatusChange?.('error');
|
|
84
|
-
onErrorProps?.(e);
|
|
85
|
-
},
|
|
86
|
-
[onErrorProps]
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
if (status === 'error') {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return (
|
|
94
|
-
<RNImage
|
|
95
|
-
ref={ref}
|
|
96
|
-
alt={alt}
|
|
97
|
-
onLoad={onLoad}
|
|
98
|
-
onError={onError}
|
|
99
|
-
className={cn('aspect-square h-full w-full', className)}
|
|
100
|
-
{...props}
|
|
101
|
-
/>
|
|
102
|
-
);
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
AvatarImage.displayName = 'AvatarImage';
|
|
106
|
-
|
|
107
|
-
const AvatarFallback = React.forwardRef<
|
|
108
|
-
React.ElementRef<typeof View>,
|
|
109
|
-
React.ComponentPropsWithoutRef<typeof View>
|
|
110
|
-
>(({ className, ...props }, ref) => {
|
|
111
|
-
const { alt, status } = useRootContext();
|
|
112
|
-
|
|
113
|
-
if (status !== 'error') {
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return (
|
|
118
|
-
<View
|
|
119
|
-
ref={ref}
|
|
120
|
-
role="img"
|
|
121
|
-
aria-label={alt}
|
|
122
|
-
className={cn(
|
|
123
|
-
'flex h-full w-full items-center justify-center rounded-full bg-muted',
|
|
124
|
-
className
|
|
125
|
-
)}
|
|
126
|
-
{...props}
|
|
127
|
-
/>
|
|
128
|
-
);
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
AvatarFallback.displayName = 'AvatarFallback';
|
|
132
|
-
|
|
133
|
-
export { Avatar, AvatarFallback, AvatarImage };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Pressable, View } from 'react-native';
|
|
4
|
-
|
|
5
|
-
import { Text } from '~/components/nativewindui/Text';
|
|
6
|
-
import { cn } from '~/lib/cn';
|
|
7
|
-
|
|
8
|
-
export function DatePicker(
|
|
9
|
-
props: React.ComponentProps<typeof DateTimePicker> & {
|
|
10
|
-
mode: 'date' | 'time' | 'datetime';
|
|
11
|
-
} & {
|
|
12
|
-
materialDateClassName?: string;
|
|
13
|
-
materialDateLabel?: string;
|
|
14
|
-
materialDateLabelClassName?: string;
|
|
15
|
-
materialTimeClassName?: string;
|
|
16
|
-
materialTimeLabel?: string;
|
|
17
|
-
materialTimeLabelClassName?: string;
|
|
18
|
-
}
|
|
19
|
-
) {
|
|
20
|
-
const show = (currentMode: 'time' | 'date') => () => {
|
|
21
|
-
DateTimePickerAndroid.open({
|
|
22
|
-
value: props.value,
|
|
23
|
-
onChange: props.onChange,
|
|
24
|
-
mode: currentMode,
|
|
25
|
-
minimumDate: props.minimumDate,
|
|
26
|
-
maximumDate: props.maximumDate,
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<View className="flex-row gap-2.5">
|
|
32
|
-
{props.mode.includes('date') && (
|
|
33
|
-
<View className={cn('relative pt-1.5', props.materialDateClassName)}>
|
|
34
|
-
<Pressable
|
|
35
|
-
onPress={show('date')}
|
|
36
|
-
className="border-foreground/30 rounded border py-3 pl-2.5 active:opacity-80">
|
|
37
|
-
<Text className="py-px">
|
|
38
|
-
{new Intl.DateTimeFormat('en-US', {
|
|
39
|
-
dateStyle: 'medium',
|
|
40
|
-
}).format(props.value)}
|
|
41
|
-
</Text>
|
|
42
|
-
</Pressable>
|
|
43
|
-
<View
|
|
44
|
-
className={cn('bg-card absolute left-2 top-0 px-1', props.materialDateLabelClassName)}>
|
|
45
|
-
<Text variant="caption2" className="text-[10px] opacity-60">
|
|
46
|
-
{props.materialDateLabel ?? 'Date'}
|
|
47
|
-
</Text>
|
|
48
|
-
</View>
|
|
49
|
-
</View>
|
|
50
|
-
)}
|
|
51
|
-
{props.mode.includes('time') && (
|
|
52
|
-
<View className={cn('relative pt-1.5', props.materialTimeClassName)}>
|
|
53
|
-
<Pressable
|
|
54
|
-
onPress={show('time')}
|
|
55
|
-
className="border-foreground/30 rounded border py-3 pl-2.5 active:opacity-80">
|
|
56
|
-
<Text className="py-px">
|
|
57
|
-
{new Intl.DateTimeFormat('en-US', {
|
|
58
|
-
timeStyle: 'short',
|
|
59
|
-
}).format(props.value)}
|
|
60
|
-
</Text>
|
|
61
|
-
</Pressable>
|
|
62
|
-
<View
|
|
63
|
-
className={cn('bg-card absolute left-2 top-0 px-1', props.materialTimeLabelClassName)}>
|
|
64
|
-
<Text variant="caption2" className="text-[10px] opacity-60">
|
|
65
|
-
{props.materialTimeLabel ?? 'Time'}
|
|
66
|
-
</Text>
|
|
67
|
-
</View>
|
|
68
|
-
</View>
|
|
69
|
-
)}
|
|
70
|
-
</View>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
export function DatePicker({
|
|
5
|
-
materialDateClassName: _materialDateClassName,
|
|
6
|
-
materialDateLabel: _materialDateLabel,
|
|
7
|
-
materialDateLabelClassName: _materialDateLabelClassName,
|
|
8
|
-
materialTimeClassName: _materialTimeClassName,
|
|
9
|
-
materialTimeLabel: _materialTimeLabel,
|
|
10
|
-
materialTimeLabelClassName: _materialTimeLabelClassName,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof DateTimePicker> & {
|
|
13
|
-
mode: 'date' | 'time' | 'datetime';
|
|
14
|
-
} & {
|
|
15
|
-
materialDateClassName?: string;
|
|
16
|
-
materialDateLabel?: string;
|
|
17
|
-
materialDateLabelClassName?: string;
|
|
18
|
-
materialTimeClassName?: string;
|
|
19
|
-
materialTimeLabel?: string;
|
|
20
|
-
materialTimeLabelClassName?: string;
|
|
21
|
-
}) {
|
|
22
|
-
return <DateTimePicker {...props} />;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DatePicker';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Picker as RNPicker } from '@react-native-picker/picker';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { cn } from '~/lib/cn';
|
|
5
|
-
import { useColorScheme } from '~/lib/useColorScheme';
|
|
6
|
-
|
|
7
|
-
function Picker<T>({
|
|
8
|
-
mode = 'dropdown',
|
|
9
|
-
style,
|
|
10
|
-
dropdownIconColor,
|
|
11
|
-
dropdownIconRippleColor,
|
|
12
|
-
className,
|
|
13
|
-
...props
|
|
14
|
-
}: React.ComponentPropsWithoutRef<typeof RNPicker<T>>) {
|
|
15
|
-
const { colors } = useColorScheme();
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<View
|
|
19
|
-
className={cn(
|
|
20
|
-
'ios:shadow-sm ios:shadow-black/5 rounded-md border border-background bg-background',
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
>
|
|
24
|
-
<RNPicker
|
|
25
|
-
mode={mode}
|
|
26
|
-
style={
|
|
27
|
-
style ?? {
|
|
28
|
-
backgroundColor: colors.root,
|
|
29
|
-
borderRadius: 8,
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
dropdownIconColor={dropdownIconColor ?? colors.foreground}
|
|
33
|
-
dropdownIconRippleColor={dropdownIconRippleColor ?? colors.foreground}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
36
|
-
</View>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const PickerItem = RNPicker.Item;
|
|
41
|
-
|
|
42
|
-
export { Picker, PickerItem };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import Animated, {
|
|
4
|
-
Extrapolation,
|
|
5
|
-
interpolate,
|
|
6
|
-
useAnimatedStyle,
|
|
7
|
-
useDerivedValue,
|
|
8
|
-
withSpring,
|
|
9
|
-
} from 'react-native-reanimated';
|
|
10
|
-
|
|
11
|
-
import { cn } from '~/lib/cn';
|
|
12
|
-
|
|
13
|
-
const DEFAULT_MAX = 100;
|
|
14
|
-
|
|
15
|
-
const ProgressIndicator = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof View>,
|
|
17
|
-
React.ComponentPropsWithoutRef<typeof View> & {
|
|
18
|
-
value?: number;
|
|
19
|
-
max?: number;
|
|
20
|
-
getValueLabel?: (value: number, max: number) => string;
|
|
21
|
-
}
|
|
22
|
-
>(
|
|
23
|
-
(
|
|
24
|
-
{
|
|
25
|
-
value: valueProp,
|
|
26
|
-
max: maxProp,
|
|
27
|
-
getValueLabel = defaultGetValueLabel,
|
|
28
|
-
className,
|
|
29
|
-
children,
|
|
30
|
-
...props
|
|
31
|
-
},
|
|
32
|
-
ref
|
|
33
|
-
) => {
|
|
34
|
-
const max = maxProp ?? DEFAULT_MAX;
|
|
35
|
-
const value = isValidValueNumber(valueProp, max) ? valueProp : 0;
|
|
36
|
-
const progress = useDerivedValue(() => value ?? 0);
|
|
37
|
-
|
|
38
|
-
const indicator = useAnimatedStyle(() => {
|
|
39
|
-
return {
|
|
40
|
-
width: withSpring(
|
|
41
|
-
`${interpolate(progress.value, [0, 100], [1, 100], Extrapolation.CLAMP)}%`,
|
|
42
|
-
{ overshootClamping: true }
|
|
43
|
-
),
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<View
|
|
49
|
-
role="progressbar"
|
|
50
|
-
ref={ref}
|
|
51
|
-
aria-valuemax={max}
|
|
52
|
-
aria-valuemin={0}
|
|
53
|
-
aria-valuenow={value}
|
|
54
|
-
aria-valuetext={getValueLabel(value, max)}
|
|
55
|
-
accessibilityValue={{
|
|
56
|
-
min: 0,
|
|
57
|
-
max,
|
|
58
|
-
now: value,
|
|
59
|
-
text: getValueLabel(value, max),
|
|
60
|
-
}}
|
|
61
|
-
className={cn('relative h-1 w-full overflow-hidden rounded-full', className)}
|
|
62
|
-
{...props}>
|
|
63
|
-
<View className="absolute bottom-0 left-0 right-0 top-0 bg-muted opacity-20" />
|
|
64
|
-
<Animated.View role="presentation" style={indicator} className={cn('h-full bg-primary')} /></View> );
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
ProgressIndicator.displayName = 'ProgressIndicator';
|
|
69
|
-
|
|
70
|
-
export { ProgressIndicator };
|
|
71
|
-
|
|
72
|
-
function defaultGetValueLabel(value: number, max: number) {
|
|
73
|
-
return `${Math.round((value / max) * 100)}%`;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function isValidValueNumber(value: any, max: number): value is number {
|
|
77
|
-
return typeof value === 'number' && !isNaN(value) && value <= max && value >= 0;
|
|
78
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BottomSheetBackdrop,
|
|
3
|
-
BottomSheetBackdropProps,
|
|
4
|
-
BottomSheetModal,
|
|
5
|
-
} from '@gorhom/bottom-sheet';
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
|
|
8
|
-
import { useColorScheme } from '~/lib/useColorScheme';
|
|
9
|
-
|
|
10
|
-
const Sheet = React.forwardRef<
|
|
11
|
-
BottomSheetModal,
|
|
12
|
-
React.ComponentPropsWithoutRef<typeof BottomSheetModal>
|
|
13
|
-
>(({ index = 0, backgroundStyle, style, handleIndicatorStyle, ...props }, ref) => {
|
|
14
|
-
const { colors } = useColorScheme();
|
|
15
|
-
|
|
16
|
-
const renderBackdrop = React.useCallback(
|
|
17
|
-
(props: BottomSheetBackdropProps) => <BottomSheetBackdrop {...props} disappearsOnIndex={-1} />,
|
|
18
|
-
[]
|
|
19
|
-
);
|
|
20
|
-
return (
|
|
21
|
-
<BottomSheetModal
|
|
22
|
-
ref={ref}
|
|
23
|
-
index={0}
|
|
24
|
-
backgroundStyle={
|
|
25
|
-
backgroundStyle ?? {
|
|
26
|
-
backgroundColor: colors.card,
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
style={
|
|
30
|
-
style ?? {
|
|
31
|
-
borderWidth: 1,
|
|
32
|
-
borderColor: colors.grey5,
|
|
33
|
-
borderTopStartRadius: 16,
|
|
34
|
-
borderTopEndRadius: 16,
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
handleIndicatorStyle={
|
|
38
|
-
handleIndicatorStyle ?? {
|
|
39
|
-
backgroundColor: colors.grey4,
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
backdropComponent={renderBackdrop}
|
|
43
|
-
{...props}
|
|
44
|
-
/>
|
|
45
|
-
);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
function useSheetRef() {
|
|
49
|
-
return React.useRef<BottomSheetModal>(null);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { Sheet, useSheetRef };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import RNSlider from '@react-native-community/slider';
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { useColorScheme } from '~/lib/useColorScheme';
|
|
5
|
-
import { COLORS } from '~/theme/colors';
|
|
6
|
-
|
|
7
|
-
function Slider({
|
|
8
|
-
thumbTintColor,
|
|
9
|
-
minimumTrackTintColor,
|
|
10
|
-
maximumTrackTintColor,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentPropsWithoutRef<typeof RNSlider>) {
|
|
13
|
-
const { colors } = useColorScheme();
|
|
14
|
-
return (
|
|
15
|
-
<RNSlider
|
|
16
|
-
thumbTintColor={thumbTintColor ?? Platform.OS === 'ios' ? COLORS.white : colors.primary}
|
|
17
|
-
minimumTrackTintColor={minimumTrackTintColor ?? colors.primary}
|
|
18
|
-
maximumTrackTintColor={
|
|
19
|
-
maximumTrackTintColor ?? Platform.OS === 'android' ? colors.primary : undefined
|
|
20
|
-
}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { Slider };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { VariantProps, cva } from 'class-variance-authority';
|
|
2
|
-
import { cssInterop } from 'nativewind';
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { UITextView } from 'react-native-uitextview';
|
|
5
|
-
|
|
6
|
-
import { cn } from '~/lib/cn';
|
|
7
|
-
|
|
8
|
-
cssInterop(UITextView, { className: 'style' });
|
|
9
|
-
|
|
10
|
-
const textVariants = cva('text-foreground', {
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
largeTitle: 'text-4xl',
|
|
14
|
-
title1: 'text-2xl',
|
|
15
|
-
title2: 'text-[22px] leading-7',
|
|
16
|
-
title3: 'text-xl',
|
|
17
|
-
heading: 'text-[17px] leading-6 font-semibold',
|
|
18
|
-
body: 'text-[17px] leading-6',
|
|
19
|
-
callout: 'text-base',
|
|
20
|
-
subhead: 'text-[15px] leading-6',
|
|
21
|
-
footnote: 'text-[13px] leading-5',
|
|
22
|
-
caption1: 'text-xs',
|
|
23
|
-
caption2: 'text-[11px] leading-4',
|
|
24
|
-
},
|
|
25
|
-
color: {
|
|
26
|
-
primary: '',
|
|
27
|
-
secondary: 'text-secondary-foreground/90',
|
|
28
|
-
tertiary: 'text-muted-foreground/90',
|
|
29
|
-
quarternary: 'text-muted-foreground/50',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
defaultVariants: {
|
|
33
|
-
variant: 'body',
|
|
34
|
-
color: 'primary',
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
const TextClassContext = React.createContext<string | undefined>(undefined);
|
|
39
|
-
|
|
40
|
-
function Text({
|
|
41
|
-
className,
|
|
42
|
-
variant,
|
|
43
|
-
color,
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentPropsWithoutRef<typeof UITextView> & VariantProps<typeof textVariants>) {
|
|
46
|
-
const textClassName = React.useContext(TextClassContext);
|
|
47
|
-
return (
|
|
48
|
-
<UITextView
|
|
49
|
-
className={cn(textVariants({ variant, color }), textClassName, className)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { Text, TextClassContext, textVariants };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Switch } from 'react-native';
|
|
2
|
-
|
|
3
|
-
import { useColorScheme } from '~/lib/useColorScheme';
|
|
4
|
-
import { COLORS } from '~/theme/colors';
|
|
5
|
-
|
|
6
|
-
function Toggle(props: React.ComponentPropsWithoutRef<typeof Switch>) {
|
|
7
|
-
const { colors } = useColorScheme();
|
|
8
|
-
return (
|
|
9
|
-
<Switch
|
|
10
|
-
trackColor={{
|
|
11
|
-
true: colors.primary,
|
|
12
|
-
false: colors.grey,
|
|
13
|
-
}}
|
|
14
|
-
thumbColor={COLORS.white}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { Toggle };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
2
|
-
const { getDefaultConfig } = require("expo/metro-config");
|
|
3
|
-
|
|
4
|
-
const { withNativeWind } = require("nativewind/metro");
|
|
5
|
-
|
|
6
|
-
/** @type {import('expo/metro-config').MetroConfig} */
|
|
7
|
-
// eslint-disable-next-line no-undef
|
|
8
|
-
const config = getDefaultConfig(__dirname);
|
|
9
|
-
|
|
10
|
-
module.exports = withNativeWind(config, { input: "./global.css" });
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "test-no-install",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"main": "expo-router/entry",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"android": "expo start --android",
|
|
7
|
-
"ios": "expo start --ios",
|
|
8
|
-
"start": "expo start",
|
|
9
|
-
"prebuild": "expo prebuild",
|
|
10
|
-
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
|
|
11
|
-
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
|
|
12
|
-
"web": "expo start --web"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@expo/react-native-action-sheet": "^4.1.0",
|
|
16
|
-
"@expo/vector-icons": "^14.0.0",
|
|
17
|
-
"@gorhom/bottom-sheet": "^4.6.4",
|
|
18
|
-
"@react-native-community/datetimepicker": "8.0.1",
|
|
19
|
-
"@react-native-community/slider": "4.5.2",
|
|
20
|
-
"@react-native-picker/picker": "2.7.5",
|
|
21
|
-
"@react-navigation/native": "^6.1.7",
|
|
22
|
-
"expo": "^51.0.0",
|
|
23
|
-
"expo-constants": "~16.0.1",
|
|
24
|
-
"expo-linking": "~6.3.1",
|
|
25
|
-
"expo-router": "~3.5.14",
|
|
26
|
-
"expo-status-bar": "~1.12.1",
|
|
27
|
-
"expo-store-review": "~7.0.2",
|
|
28
|
-
"expo-system-ui": "~3.0.4",
|
|
29
|
-
"expo-web-browser": "~13.0.3",
|
|
30
|
-
"nativewind": "^4.0.1",
|
|
31
|
-
"react": "18.2.0",
|
|
32
|
-
"react-dom": "18.2.0",
|
|
33
|
-
"react-native": "0.74.1",
|
|
34
|
-
"react-native-gesture-handler": "~2.16.1",
|
|
35
|
-
"react-native-reanimated": "~3.10.1",
|
|
36
|
-
"react-native-safe-area-context": "4.10.1",
|
|
37
|
-
"react-native-screens": "3.31.1",
|
|
38
|
-
"react-native-web": "~0.19.10"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@babel/core": "^7.20.0",
|
|
42
|
-
"@types/react": "~18.2.45",
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
|
44
|
-
"@typescript-eslint/parser": "^7.7.0",
|
|
45
|
-
"eslint": "^8.57.0",
|
|
46
|
-
"eslint-config-universe": "^12.0.1",
|
|
47
|
-
"prettier": "^3.2.5",
|
|
48
|
-
"prettier-plugin-tailwindcss": "^0.5.11",
|
|
49
|
-
"tailwindcss": "^3.4.0",
|
|
50
|
-
"typescript": "~5.3.3"
|
|
51
|
-
},
|
|
52
|
-
"eslintConfig": {
|
|
53
|
-
"extends": "universe/native",
|
|
54
|
-
"root": true
|
|
55
|
-
},
|
|
56
|
-
"expo": {
|
|
57
|
-
"install": {
|
|
58
|
-
"exclude": [
|
|
59
|
-
"react-native-safe-area-context"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"private": true
|
|
64
|
-
}
|