@campxdev/react-native-blueprint 0.1.4 → 0.1.7
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 +55 -0
- package/lib/module/components/ui/Accordion.js.map +1 -1
- package/lib/module/components/ui/Alert-Dialog.js +2 -2
- package/lib/module/components/ui/Alert-Dialog.js.map +1 -1
- package/lib/module/components/ui/Alert.js +2 -2
- package/lib/module/components/ui/Alert.js.map +1 -1
- package/lib/module/components/ui/AppBar.js.map +1 -1
- package/lib/module/components/ui/Avatar.js +3 -3
- package/lib/module/components/ui/Avatar.js.map +1 -1
- package/lib/module/components/ui/Bottom-Sheet.js +9 -2
- package/lib/module/components/ui/Bottom-Sheet.js.map +1 -1
- package/lib/module/components/ui/Context-Menu.js +24 -24
- package/lib/module/components/ui/Context-Menu.js.map +1 -1
- package/lib/module/components/ui/Custom-Card.js +6 -2
- package/lib/module/components/ui/Custom-Card.js.map +1 -1
- package/lib/module/components/ui/Dialog.js +3 -3
- package/lib/module/components/ui/Dialog.js.map +1 -1
- package/lib/module/components/ui/Dropdown-Menu.js +3 -3
- package/lib/module/components/ui/Dropdown-Menu.js.map +1 -1
- package/lib/module/components/ui/Input.js +3 -2
- package/lib/module/components/ui/Input.js.map +1 -1
- package/lib/module/components/ui/Menubar.js +4 -4
- package/lib/module/components/ui/Menubar.js.map +1 -1
- package/lib/module/components/ui/Native-Only-Animated-View.js.map +1 -1
- package/lib/module/components/ui/NavBar.js.map +1 -1
- package/lib/module/components/ui/Progress.js +2 -2
- package/lib/module/components/ui/Progress.js.map +1 -1
- package/lib/module/components/ui/Select.js +3 -3
- package/lib/module/components/ui/Select.js.map +1 -1
- package/lib/module/components/ui/Separator.js +2 -2
- package/lib/module/components/ui/Separator.js.map +1 -1
- package/lib/module/components/ui/Skeleton.js +2 -2
- package/lib/module/components/ui/Skeleton.js.map +1 -1
- package/lib/module/components/ui/Slider.js +7 -2
- package/lib/module/components/ui/Slider.js.map +1 -1
- package/lib/module/components/ui/Table.js +2 -2
- package/lib/module/components/ui/Table.js.map +1 -1
- package/lib/module/components/ui/Text.js.map +1 -1
- package/lib/module/components/ui/Textarea.js +3 -2
- package/lib/module/components/ui/Textarea.js.map +1 -1
- package/lib/module/components/ui/Theme-Toggle.js +3 -3
- package/lib/module/components/ui/Theme-Toggle.js.map +1 -1
- package/lib/module/components/ui/Toast.js +2 -2
- package/lib/module/components/ui/Toast.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/lib/slot-helpers.js +19 -0
- package/lib/module/lib/slot-helpers.js.map +1 -0
- package/lib/module/types/components.d.js +4 -0
- package/lib/module/types/components.d.js.map +1 -0
- package/lib/module/types/global.d.js +5 -0
- package/lib/module/types/global.d.js.map +1 -1
- package/lib/module/types/rn-primitives.d.js +56 -1
- package/lib/module/types/rn-primitives.d.js.map +1 -1
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/app/_layout.d.ts +7 -0
- package/lib/typescript/src/app/_layout.d.ts.map +1 -0
- package/lib/typescript/src/components/theme-config.d.ts +174 -0
- package/lib/typescript/src/components/theme-config.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Accordion.d.ts +103 -0
- package/lib/typescript/src/components/ui/Accordion.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Alert-Dialog.d.ts +145 -0
- package/lib/typescript/src/components/ui/Alert-Dialog.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Alert.d.ts +61 -0
- package/lib/typescript/src/components/ui/Alert.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/AppBar.d.ts +227 -0
- package/lib/typescript/src/components/ui/AppBar.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Aspect-Ratio.d.ts +24 -0
- package/lib/typescript/src/components/ui/Aspect-Ratio.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Avatar.d.ts +1486 -0
- package/lib/typescript/src/components/ui/Avatar.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Badge.d.ts +77 -0
- package/lib/typescript/src/components/ui/Badge.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Bottom-Sheet.d.ts +43 -0
- package/lib/typescript/src/components/ui/Bottom-Sheet.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Button.d.ts +23 -0
- package/lib/typescript/src/components/ui/Button.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Card.d.ts +93 -0
- package/lib/typescript/src/components/ui/Card.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Checkbox.d.ts +36 -0
- package/lib/typescript/src/components/ui/Checkbox.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Collapsible.d.ts +37 -0
- package/lib/typescript/src/components/ui/Collapsible.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Context-Menu.d.ts +107 -0
- package/lib/typescript/src/components/ui/Context-Menu.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Custom-Card.d.ts +103 -0
- package/lib/typescript/src/components/ui/Custom-Card.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Dialog.d.ts +90 -0
- package/lib/typescript/src/components/ui/Dialog.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Dropdown-Menu.d.ts +242 -0
- package/lib/typescript/src/components/ui/Dropdown-Menu.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Floating-Action.d.ts +44 -0
- package/lib/typescript/src/components/ui/Floating-Action.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Greeting-Card.d.ts +153 -0
- package/lib/typescript/src/components/ui/Greeting-Card.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Hover-Card.d.ts +49 -0
- package/lib/typescript/src/components/ui/Hover-Card.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Icon.d.ts +43 -0
- package/lib/typescript/src/components/ui/Icon.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Input.d.ts +54 -0
- package/lib/typescript/src/components/ui/Input.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Label.d.ts +34 -0
- package/lib/typescript/src/components/ui/Label.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Menubar.d.ts +142 -0
- package/lib/typescript/src/components/ui/Menubar.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Native-Only-Animated-View.d.ts +26 -0
- package/lib/typescript/src/components/ui/Native-Only-Animated-View.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/NavBar.d.ts +273 -0
- package/lib/typescript/src/components/ui/NavBar.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Popover.d.ts +54 -0
- package/lib/typescript/src/components/ui/Popover.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Progress.d.ts +27 -0
- package/lib/typescript/src/components/ui/Progress.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Radio-Group.d.ts +47 -0
- package/lib/typescript/src/components/ui/Radio-Group.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Select.d.ts +86 -0
- package/lib/typescript/src/components/ui/Select.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Separator.d.ts +40 -0
- package/lib/typescript/src/components/ui/Separator.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/SizedBox.d.ts +79 -0
- package/lib/typescript/src/components/ui/SizedBox.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Skeleton.d.ts +42 -0
- package/lib/typescript/src/components/ui/Skeleton.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Slider.d.ts +56 -0
- package/lib/typescript/src/components/ui/Slider.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Switch.d.ts +34 -0
- package/lib/typescript/src/components/ui/Switch.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Table.d.ts +80 -0
- package/lib/typescript/src/components/ui/Table.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Tabs.d.ts +51 -0
- package/lib/typescript/src/components/ui/Tabs.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Text.d.ts +45 -0
- package/lib/typescript/src/components/ui/Text.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Textarea.d.ts +65 -0
- package/lib/typescript/src/components/ui/Textarea.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Theme-Toggle.d.ts +67 -0
- package/lib/typescript/src/components/ui/Theme-Toggle.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Toast.d.ts +56 -0
- package/lib/typescript/src/components/ui/Toast.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Toggle-Group.d.ts +49 -0
- package/lib/typescript/src/components/ui/Toggle-Group.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Toggle.d.ts +53 -0
- package/lib/typescript/src/components/ui/Toggle.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Tooltip.d.ts +51 -0
- package/lib/typescript/src/components/ui/Tooltip.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/index.d.ts +44 -0
- package/lib/typescript/src/components/ui/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +9 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/lib/ThemeProvider.d.ts +137 -0
- package/lib/typescript/src/lib/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/src/lib/cornerRadius.d.ts +112 -0
- package/lib/typescript/src/lib/cornerRadius.d.ts.map +1 -0
- package/lib/typescript/src/lib/fonts.d.ts +21 -0
- package/lib/typescript/src/lib/fonts.d.ts.map +1 -0
- package/lib/typescript/src/lib/slot-helpers.d.ts +32 -0
- package/lib/typescript/src/lib/slot-helpers.d.ts.map +1 -0
- package/lib/typescript/src/lib/theme.d.ts +87 -0
- package/lib/typescript/src/lib/theme.d.ts.map +1 -0
- package/lib/typescript/src/lib/utils.d.ts +111 -0
- package/lib/typescript/src/lib/utils.d.ts.map +1 -0
- package/nativewind-env.d.ts +7 -0
- package/package.json +15 -2
- package/src/components/ui/Accordion.tsx +3 -1
- package/src/components/ui/Alert-Dialog.tsx +5 -3
- package/src/components/ui/Alert.tsx +7 -4
- package/src/components/ui/AppBar.tsx +6 -2
- package/src/components/ui/Avatar.tsx +10 -6
- package/src/components/ui/Bottom-Sheet.tsx +10 -2
- package/src/components/ui/Context-Menu.tsx +15 -4
- package/src/components/ui/Custom-Card.tsx +6 -1
- package/src/components/ui/Dialog.tsx +13 -3
- package/src/components/ui/Dropdown-Menu.tsx +8 -4
- package/src/components/ui/Input.tsx +12 -4
- package/src/components/ui/Menubar.tsx +13 -6
- package/src/components/ui/Native-Only-Animated-View.tsx +1 -1
- package/src/components/ui/NavBar.tsx +9 -3
- package/src/components/ui/Progress.tsx +4 -2
- package/src/components/ui/Select.tsx +18 -6
- package/src/components/ui/Separator.tsx +4 -2
- package/src/components/ui/Skeleton.tsx +5 -3
- package/src/components/ui/Slider.tsx +8 -2
- package/src/components/ui/Table.tsx +9 -7
- package/src/components/ui/Text.tsx +1 -6
- package/src/components/ui/Textarea.tsx +15 -4
- package/src/components/ui/Theme-Toggle.tsx +7 -3
- package/src/components/ui/Toast.tsx +6 -3
- package/src/index.tsx +3 -0
- package/src/lib/slot-helpers.ts +57 -0
- package/src/types/components.d.ts +38 -0
- package/src/types/global.d.ts +178 -4
- package/src/types/rn-primitives.d.ts +1403 -46
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component-specific type declarations
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { TextInputProps, TextInput as RNTextInput } from 'react-native';
|
|
6
|
+
import type { ComponentType } from 'react';
|
|
7
|
+
|
|
8
|
+
// Input component types
|
|
9
|
+
export interface InputProps extends Omit<TextInputProps, 'editable'> {
|
|
10
|
+
className?: string;
|
|
11
|
+
placeholderClassName?: string;
|
|
12
|
+
editable?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type TextInput = RNTextInput;
|
|
16
|
+
|
|
17
|
+
// NativeWind cssInterop types
|
|
18
|
+
declare module 'nativewind' {
|
|
19
|
+
/**
|
|
20
|
+
* Apply CSS interop to a component, allowing it to accept className prop
|
|
21
|
+
* @param component - The component to apply interop to
|
|
22
|
+
* @param mapping - Mapping configuration
|
|
23
|
+
* @returns The component with className support
|
|
24
|
+
*/
|
|
25
|
+
export function cssInterop<T extends ComponentType<any>>(
|
|
26
|
+
component: T,
|
|
27
|
+
mapping: Record<
|
|
28
|
+
string,
|
|
29
|
+
string | { target: string; nativeStyleToProp?: Record<string, string> }
|
|
30
|
+
>
|
|
31
|
+
): T;
|
|
32
|
+
|
|
33
|
+
export function useColorScheme(): {
|
|
34
|
+
colorScheme: 'light' | 'dark';
|
|
35
|
+
setColorScheme: (scheme: 'light' | 'dark') => void;
|
|
36
|
+
toggleColorScheme: () => void;
|
|
37
|
+
};
|
|
38
|
+
}
|
package/src/types/global.d.ts
CHANGED
|
@@ -21,15 +21,189 @@ declare module 'react-native' {
|
|
|
21
21
|
interface PressableProps {
|
|
22
22
|
className?: string;
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
interface TouchableOpacityProps {
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface TouchableHighlightProps {
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface TouchableWithoutFeedbackProps {
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
38
|
+
interface FlatListProps<ItemT = any> {
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43
|
+
interface SectionListProps<ItemT = any, SectionT = any> {
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface TextInputProps {
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface SafeAreaViewProps {
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface KeyboardAvoidingViewProps {
|
|
56
|
+
className?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface ModalProps {
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface ActivityIndicatorProps {
|
|
64
|
+
className?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface SwitchProps {
|
|
68
|
+
className?: string;
|
|
69
|
+
}
|
|
24
70
|
}
|
|
25
71
|
|
|
26
72
|
declare module 'react-native-reanimated' {
|
|
73
|
+
import type {
|
|
74
|
+
ViewProps,
|
|
75
|
+
TextProps,
|
|
76
|
+
ImageProps,
|
|
77
|
+
ScrollViewProps,
|
|
78
|
+
} from 'react-native';
|
|
79
|
+
|
|
80
|
+
export interface BaseAnimationBuilder {
|
|
81
|
+
duration(durationMs: number): BaseAnimationBuilder;
|
|
82
|
+
delay(delayMs: number): BaseAnimationBuilder;
|
|
83
|
+
withInitialValues(values: Record<string, any>): BaseAnimationBuilder;
|
|
84
|
+
withCallback(callback: (finished: boolean) => void): BaseAnimationBuilder;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface LayoutAnimation extends BaseAnimationBuilder {}
|
|
88
|
+
export interface EntryExitAnimation extends BaseAnimationBuilder {}
|
|
89
|
+
|
|
90
|
+
export type AnimatedProps<P> = P & {
|
|
91
|
+
style?: any; // Allow any style including animated styles from useAnimatedStyle
|
|
92
|
+
animatedProps?: Partial<P>;
|
|
93
|
+
layout?: any; // Allow any layout animation
|
|
94
|
+
entering?: any; // Allow any entering animation
|
|
95
|
+
exiting?: any; // Allow any exiting animation
|
|
96
|
+
className?: string;
|
|
97
|
+
children?: React.ReactNode;
|
|
98
|
+
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only';
|
|
99
|
+
};
|
|
100
|
+
|
|
27
101
|
namespace Animated {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
102
|
+
export const View: React.ForwardRefExoticComponent<
|
|
103
|
+
AnimatedProps<ViewProps> & React.RefAttributes<any>
|
|
104
|
+
>;
|
|
105
|
+
export const Text: React.ForwardRefExoticComponent<
|
|
106
|
+
AnimatedProps<TextProps> & React.RefAttributes<any>
|
|
107
|
+
>;
|
|
108
|
+
export const Image: React.ForwardRefExoticComponent<
|
|
109
|
+
AnimatedProps<ImageProps> & React.RefAttributes<any>
|
|
110
|
+
>;
|
|
111
|
+
export const ScrollView: React.ForwardRefExoticComponent<
|
|
112
|
+
AnimatedProps<ScrollViewProps> & React.RefAttributes<any>
|
|
113
|
+
>;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
declare module 'react-native-gesture-handler' {
|
|
118
|
+
interface GestureHandlerProperties {
|
|
119
|
+
className?: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface PanGestureHandlerProps {
|
|
123
|
+
className?: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
interface TapGestureHandlerProps {
|
|
127
|
+
className?: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
interface LongPressGestureHandlerProps {
|
|
131
|
+
className?: string;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare module 'react-native-svg' {
|
|
136
|
+
interface SvgProps {
|
|
137
|
+
className?: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
interface PathProps {
|
|
141
|
+
className?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface CircleProps {
|
|
145
|
+
className?: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
interface RectProps {
|
|
149
|
+
className?: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface LineProps {
|
|
153
|
+
className?: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
interface PolygonProps {
|
|
157
|
+
className?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface PolylineProps {
|
|
161
|
+
className?: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
interface EllipseProps {
|
|
165
|
+
className?: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
interface GProps {
|
|
169
|
+
className?: string;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// BottomSheet
|
|
174
|
+
declare module '@gorhom/bottom-sheet' {
|
|
175
|
+
import type { ViewProps } from 'react-native';
|
|
176
|
+
import type { ReactNode } from 'react';
|
|
177
|
+
|
|
178
|
+
export interface BottomSheetViewProps extends ViewProps {
|
|
179
|
+
className?: string;
|
|
180
|
+
children?: ReactNode;
|
|
181
|
+
style?: any;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export const BottomSheetView: React.FC<BottomSheetViewProps>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Lucide React Native
|
|
188
|
+
declare module 'lucide-react-native' {
|
|
189
|
+
import type { ComponentType } from 'react';
|
|
190
|
+
import type { ViewStyle } from 'react-native';
|
|
191
|
+
|
|
192
|
+
export interface LucideProps {
|
|
193
|
+
color?: string;
|
|
194
|
+
size?: number | string;
|
|
195
|
+
strokeWidth?: number;
|
|
196
|
+
absoluteStrokeWidth?: boolean;
|
|
197
|
+
style?: ViewStyle;
|
|
198
|
+
className?: string;
|
|
199
|
+
fill?: string;
|
|
32
200
|
}
|
|
201
|
+
|
|
202
|
+
export type LucideIcon = ComponentType<LucideProps>;
|
|
203
|
+
|
|
204
|
+
export const ChevronDown: LucideIcon;
|
|
205
|
+
// Add other icon exports as needed
|
|
206
|
+
export * from 'lucide-react-native';
|
|
33
207
|
}
|
|
34
208
|
|
|
35
209
|
declare global {
|