create-expo-stack 2.11.14 → 2.11.15-next.ff5544c

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.
Files changed (28) hide show
  1. package/build/commands/create-expo-stack.js +15 -3
  2. package/build/constants.js +1 -2
  3. package/build/templates/base/package.json.ejs +0 -2
  4. package/build/templates/packages/nativewindui/drawer/app/(drawer)/index.tsx.ejs +1 -6
  5. package/build/templates/packages/nativewindui/drawer/app/_layout.tsx.ejs +1 -1
  6. package/build/templates/packages/nativewindui/stack/app/_layout.tsx.ejs +1 -1
  7. package/build/templates/packages/nativewindui/stack/app/index.tsx.ejs +1 -6
  8. package/build/templates/packages/nativewindui/tabs/app/(tabs)/index.tsx.ejs +1 -6
  9. package/build/templates/packages/nativewindui/tabs/app/_layout.tsx.ejs +1 -1
  10. package/build/types/types.d.ts +1 -1
  11. package/build/types/utilities/systemCommand.d.ts +3 -1
  12. package/build/utilities/configureProjectFiles.js +2 -37
  13. package/build/utilities/getPackageManager.js +6 -4
  14. package/build/utilities/printOutput.js +22 -5
  15. package/build/utilities/runCLI.js +4 -4
  16. package/build/utilities/systemCommand.js +5 -4
  17. package/package.json +72 -72
  18. package/build/templates/packages/nativewindui/components/nativewindui/ActivityIndicator.tsx.ejs +0 -10
  19. package/build/templates/packages/nativewindui/components/nativewindui/Avatar.tsx.ejs +0 -143
  20. package/build/templates/packages/nativewindui/components/nativewindui/DatePicker.android.tsx.ejs +0 -66
  21. package/build/templates/packages/nativewindui/components/nativewindui/DatePicker.tsx.ejs +0 -10
  22. package/build/templates/packages/nativewindui/components/nativewindui/Picker.tsx.ejs +0 -39
  23. package/build/templates/packages/nativewindui/components/nativewindui/ProgressIndicator.tsx.ejs +0 -95
  24. package/build/templates/packages/nativewindui/components/nativewindui/Sheet.tsx.ejs +0 -59
  25. package/build/templates/packages/nativewindui/components/nativewindui/Slider.tsx.ejs +0 -28
  26. package/build/templates/packages/nativewindui/components/nativewindui/Text.tsx.ejs +0 -79
  27. package/build/templates/packages/nativewindui/components/nativewindui/Toggle.tsx.ejs +0 -17
  28. /package/build/templates/packages/nativewindui/components/{nativewindui/ThemeToggle.tsx.ejs → ThemeToggle.tsx.ejs} +0 -0
@@ -1,59 +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
- >(
14
- (
15
- { index = 0, backgroundStyle, style, handleIndicatorStyle, ...props },
16
- ref
17
- ) => {
18
- const { colors } = useColorScheme();
19
-
20
- const renderBackdrop = React.useCallback(
21
- (props: BottomSheetBackdropProps) => (
22
- <BottomSheetBackdrop {...props} disappearsOnIndex={-1} />
23
- ),
24
- []
25
- );
26
- return (
27
- <BottomSheetModal
28
- ref={ref}
29
- index={0}
30
- backgroundStyle={
31
- backgroundStyle ?? {
32
- backgroundColor: colors.card,
33
- }
34
- }
35
- style={
36
- style ?? {
37
- borderWidth: 1,
38
- borderColor: colors.grey5,
39
- borderTopStartRadius: 16,
40
- borderTopEndRadius: 16,
41
- }
42
- }
43
- handleIndicatorStyle={
44
- handleIndicatorStyle ?? {
45
- backgroundColor: colors.grey4,
46
- }
47
- }
48
- backdropComponent={renderBackdrop}
49
- {...props}
50
- />
51
- );
52
- }
53
- );
54
-
55
- function useSheetRef() {
56
- return React.useRef<BottomSheetModal>(null);
57
- }
58
-
59
- export { Sheet, useSheetRef };
@@ -1,28 +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
- export 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={
17
- thumbTintColor ?? Platform.OS === 'ios' ? COLORS.white : colors.primary
18
- }
19
- minimumTrackTintColor={minimumTrackTintColor ?? colors.primary}
20
- maximumTrackTintColor={
21
- maximumTrackTintColor ?? Platform.OS === 'android'
22
- ? colors.primary
23
- : undefined
24
- }
25
- {...props}
26
- />
27
- );
28
- }
@@ -1,79 +0,0 @@
1
- import { VariantProps, cva } from 'class-variance-authority';
2
- import * as React from 'react';
3
- <% if (props.stylingPackage?.options.selectedComponents.includes('selectable-text')) { %>
4
- import { UITextView } from 'react-native-uitextview';
5
- import { cssInterop } from 'nativewind';
6
- <% } else { %>
7
- import { Text as RNText } from 'react-native';
8
- <% } %>
9
-
10
- import { cn } from '~/lib/cn';
11
-
12
- <% if (props.stylingPackage?.options.selectedComponents.includes('selectable-text')) { %>
13
- cssInterop(UITextView, { className: 'style' });
14
- <% } %>
15
-
16
- const textVariants = cva('text-foreground', {
17
- variants: {
18
- variant: {
19
- largeTitle: 'text-4xl',
20
- title1: 'text-2xl',
21
- title2: 'text-[22px] leading-7',
22
- title3: 'text-xl',
23
- heading: 'text-[17px] leading-6 font-semibold',
24
- body: 'text-[17px] leading-6',
25
- callout: 'text-base',
26
- subhead: 'text-[15px] leading-6',
27
- footnote: 'text-[13px] leading-5',
28
- caption1: 'text-xs',
29
- caption2: 'text-[11px] leading-4',
30
- },
31
- color: {
32
- primary: '',
33
- secondary: 'text-secondary-foreground/90',
34
- tertiary: 'text-muted-foreground/90',
35
- quarternary: 'text-muted-foreground/50',
36
- },
37
- },
38
- defaultVariants: {
39
- variant: 'body',
40
- color: 'primary',
41
- },
42
- });
43
-
44
- const TextClassContext = React.createContext<string | undefined>(undefined);
45
-
46
- <% if (props.stylingPackage?.options.selectedComponents.includes('selectable-text')) { %>
47
- function Text({
48
- className,
49
- variant,
50
- color,
51
- ...props
52
- }: React.ComponentPropsWithoutRef<typeof UITextView> & VariantProps<typeof textVariants>) {
53
- const textClassName = React.useContext(TextClassContext);
54
- return (
55
- <UITextView
56
- className={cn(textVariants({ variant, color }), textClassName, className)}
57
- {...props}
58
- />
59
- );
60
- }
61
- <% } else { %>
62
- function Text({
63
- className,
64
- variant,
65
- color,
66
- ...props
67
- }: React.ComponentPropsWithoutRef<typeof RNText> & VariantProps<typeof textVariants>) {
68
- const textClassName = React.useContext(TextClassContext);
69
- return (
70
- <RNText
71
- className={cn(textVariants({ variant, color }), textClassName, className)}
72
- {...props}
73
- />
74
- );
75
- }
76
- <% } %>
77
-
78
-
79
- export { Text, TextClassContext, textVariants };
@@ -1,17 +0,0 @@
1
- import { useColorScheme } from '~/lib/useColorScheme';
2
- import { COLORS } from '~/theme/colors';
3
- import { Switch } from 'react-native';
4
-
5
- export function Toggle(props: React.ComponentPropsWithoutRef<typeof Switch>) {
6
- const { colors } = useColorScheme();
7
- return (
8
- <Switch
9
- trackColor={{
10
- true: colors.primary,
11
- false: colors.grey,
12
- }}
13
- thumbColor={COLORS.white}
14
- {...props}
15
- />
16
- );
17
- }