@campxdev/react-native-blueprint 0.1.4 → 0.1.6

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 (192) hide show
  1. package/README.md +55 -0
  2. package/lib/module/components/ui/Accordion.js.map +1 -1
  3. package/lib/module/components/ui/Alert-Dialog.js +2 -2
  4. package/lib/module/components/ui/Alert-Dialog.js.map +1 -1
  5. package/lib/module/components/ui/Alert.js +2 -2
  6. package/lib/module/components/ui/Alert.js.map +1 -1
  7. package/lib/module/components/ui/AppBar.js.map +1 -1
  8. package/lib/module/components/ui/Avatar.js +3 -3
  9. package/lib/module/components/ui/Avatar.js.map +1 -1
  10. package/lib/module/components/ui/Bottom-Sheet.js +9 -2
  11. package/lib/module/components/ui/Bottom-Sheet.js.map +1 -1
  12. package/lib/module/components/ui/Context-Menu.js +24 -24
  13. package/lib/module/components/ui/Context-Menu.js.map +1 -1
  14. package/lib/module/components/ui/Custom-Card.js +6 -2
  15. package/lib/module/components/ui/Custom-Card.js.map +1 -1
  16. package/lib/module/components/ui/Dialog.js +3 -3
  17. package/lib/module/components/ui/Dialog.js.map +1 -1
  18. package/lib/module/components/ui/Dropdown-Menu.js +3 -3
  19. package/lib/module/components/ui/Dropdown-Menu.js.map +1 -1
  20. package/lib/module/components/ui/Input.js +3 -2
  21. package/lib/module/components/ui/Input.js.map +1 -1
  22. package/lib/module/components/ui/Menubar.js +4 -4
  23. package/lib/module/components/ui/Menubar.js.map +1 -1
  24. package/lib/module/components/ui/Native-Only-Animated-View.js.map +1 -1
  25. package/lib/module/components/ui/NavBar.js.map +1 -1
  26. package/lib/module/components/ui/Progress.js +2 -2
  27. package/lib/module/components/ui/Progress.js.map +1 -1
  28. package/lib/module/components/ui/Select.js +3 -3
  29. package/lib/module/components/ui/Select.js.map +1 -1
  30. package/lib/module/components/ui/Separator.js +2 -2
  31. package/lib/module/components/ui/Separator.js.map +1 -1
  32. package/lib/module/components/ui/Skeleton.js +2 -2
  33. package/lib/module/components/ui/Skeleton.js.map +1 -1
  34. package/lib/module/components/ui/Slider.js +7 -2
  35. package/lib/module/components/ui/Slider.js.map +1 -1
  36. package/lib/module/components/ui/Table.js +2 -2
  37. package/lib/module/components/ui/Table.js.map +1 -1
  38. package/lib/module/components/ui/Text.js.map +1 -1
  39. package/lib/module/components/ui/Textarea.js +3 -2
  40. package/lib/module/components/ui/Textarea.js.map +1 -1
  41. package/lib/module/components/ui/Theme-Toggle.js +3 -3
  42. package/lib/module/components/ui/Theme-Toggle.js.map +1 -1
  43. package/lib/module/components/ui/Toast.js +2 -2
  44. package/lib/module/components/ui/Toast.js.map +1 -1
  45. package/lib/module/index.js +4 -0
  46. package/lib/module/index.js.map +1 -1
  47. package/lib/module/lib/slot-helpers.js +19 -0
  48. package/lib/module/lib/slot-helpers.js.map +1 -0
  49. package/lib/module/types/components.d.js +4 -0
  50. package/lib/module/types/components.d.js.map +1 -0
  51. package/lib/module/types/global.d.js +5 -0
  52. package/lib/module/types/global.d.js.map +1 -1
  53. package/lib/module/types/rn-primitives.d.js +56 -1
  54. package/lib/module/types/rn-primitives.d.js.map +1 -1
  55. package/lib/typescript/package.json +1 -0
  56. package/lib/typescript/src/app/_layout.d.ts +7 -0
  57. package/lib/typescript/src/app/_layout.d.ts.map +1 -0
  58. package/lib/typescript/src/components/theme-config.d.ts +174 -0
  59. package/lib/typescript/src/components/theme-config.d.ts.map +1 -0
  60. package/lib/typescript/src/components/ui/Accordion.d.ts +103 -0
  61. package/lib/typescript/src/components/ui/Accordion.d.ts.map +1 -0
  62. package/lib/typescript/src/components/ui/Alert-Dialog.d.ts +145 -0
  63. package/lib/typescript/src/components/ui/Alert-Dialog.d.ts.map +1 -0
  64. package/lib/typescript/src/components/ui/Alert.d.ts +61 -0
  65. package/lib/typescript/src/components/ui/Alert.d.ts.map +1 -0
  66. package/lib/typescript/src/components/ui/AppBar.d.ts +227 -0
  67. package/lib/typescript/src/components/ui/AppBar.d.ts.map +1 -0
  68. package/lib/typescript/src/components/ui/Aspect-Ratio.d.ts +24 -0
  69. package/lib/typescript/src/components/ui/Aspect-Ratio.d.ts.map +1 -0
  70. package/lib/typescript/src/components/ui/Avatar.d.ts +1486 -0
  71. package/lib/typescript/src/components/ui/Avatar.d.ts.map +1 -0
  72. package/lib/typescript/src/components/ui/Badge.d.ts +77 -0
  73. package/lib/typescript/src/components/ui/Badge.d.ts.map +1 -0
  74. package/lib/typescript/src/components/ui/Bottom-Sheet.d.ts +43 -0
  75. package/lib/typescript/src/components/ui/Bottom-Sheet.d.ts.map +1 -0
  76. package/lib/typescript/src/components/ui/Button.d.ts +23 -0
  77. package/lib/typescript/src/components/ui/Button.d.ts.map +1 -0
  78. package/lib/typescript/src/components/ui/Card.d.ts +93 -0
  79. package/lib/typescript/src/components/ui/Card.d.ts.map +1 -0
  80. package/lib/typescript/src/components/ui/Checkbox.d.ts +36 -0
  81. package/lib/typescript/src/components/ui/Checkbox.d.ts.map +1 -0
  82. package/lib/typescript/src/components/ui/Collapsible.d.ts +37 -0
  83. package/lib/typescript/src/components/ui/Collapsible.d.ts.map +1 -0
  84. package/lib/typescript/src/components/ui/Context-Menu.d.ts +107 -0
  85. package/lib/typescript/src/components/ui/Context-Menu.d.ts.map +1 -0
  86. package/lib/typescript/src/components/ui/Custom-Card.d.ts +103 -0
  87. package/lib/typescript/src/components/ui/Custom-Card.d.ts.map +1 -0
  88. package/lib/typescript/src/components/ui/Dialog.d.ts +90 -0
  89. package/lib/typescript/src/components/ui/Dialog.d.ts.map +1 -0
  90. package/lib/typescript/src/components/ui/Dropdown-Menu.d.ts +242 -0
  91. package/lib/typescript/src/components/ui/Dropdown-Menu.d.ts.map +1 -0
  92. package/lib/typescript/src/components/ui/Floating-Action.d.ts +44 -0
  93. package/lib/typescript/src/components/ui/Floating-Action.d.ts.map +1 -0
  94. package/lib/typescript/src/components/ui/Greeting-Card.d.ts +153 -0
  95. package/lib/typescript/src/components/ui/Greeting-Card.d.ts.map +1 -0
  96. package/lib/typescript/src/components/ui/Hover-Card.d.ts +49 -0
  97. package/lib/typescript/src/components/ui/Hover-Card.d.ts.map +1 -0
  98. package/lib/typescript/src/components/ui/Icon.d.ts +43 -0
  99. package/lib/typescript/src/components/ui/Icon.d.ts.map +1 -0
  100. package/lib/typescript/src/components/ui/Input.d.ts +54 -0
  101. package/lib/typescript/src/components/ui/Input.d.ts.map +1 -0
  102. package/lib/typescript/src/components/ui/Label.d.ts +34 -0
  103. package/lib/typescript/src/components/ui/Label.d.ts.map +1 -0
  104. package/lib/typescript/src/components/ui/Menubar.d.ts +142 -0
  105. package/lib/typescript/src/components/ui/Menubar.d.ts.map +1 -0
  106. package/lib/typescript/src/components/ui/Native-Only-Animated-View.d.ts +26 -0
  107. package/lib/typescript/src/components/ui/Native-Only-Animated-View.d.ts.map +1 -0
  108. package/lib/typescript/src/components/ui/NavBar.d.ts +273 -0
  109. package/lib/typescript/src/components/ui/NavBar.d.ts.map +1 -0
  110. package/lib/typescript/src/components/ui/Popover.d.ts +54 -0
  111. package/lib/typescript/src/components/ui/Popover.d.ts.map +1 -0
  112. package/lib/typescript/src/components/ui/Progress.d.ts +27 -0
  113. package/lib/typescript/src/components/ui/Progress.d.ts.map +1 -0
  114. package/lib/typescript/src/components/ui/Radio-Group.d.ts +47 -0
  115. package/lib/typescript/src/components/ui/Radio-Group.d.ts.map +1 -0
  116. package/lib/typescript/src/components/ui/Select.d.ts +86 -0
  117. package/lib/typescript/src/components/ui/Select.d.ts.map +1 -0
  118. package/lib/typescript/src/components/ui/Separator.d.ts +40 -0
  119. package/lib/typescript/src/components/ui/Separator.d.ts.map +1 -0
  120. package/lib/typescript/src/components/ui/SizedBox.d.ts +79 -0
  121. package/lib/typescript/src/components/ui/SizedBox.d.ts.map +1 -0
  122. package/lib/typescript/src/components/ui/Skeleton.d.ts +42 -0
  123. package/lib/typescript/src/components/ui/Skeleton.d.ts.map +1 -0
  124. package/lib/typescript/src/components/ui/Slider.d.ts +56 -0
  125. package/lib/typescript/src/components/ui/Slider.d.ts.map +1 -0
  126. package/lib/typescript/src/components/ui/Switch.d.ts +34 -0
  127. package/lib/typescript/src/components/ui/Switch.d.ts.map +1 -0
  128. package/lib/typescript/src/components/ui/Table.d.ts +80 -0
  129. package/lib/typescript/src/components/ui/Table.d.ts.map +1 -0
  130. package/lib/typescript/src/components/ui/Tabs.d.ts +51 -0
  131. package/lib/typescript/src/components/ui/Tabs.d.ts.map +1 -0
  132. package/lib/typescript/src/components/ui/Text.d.ts +45 -0
  133. package/lib/typescript/src/components/ui/Text.d.ts.map +1 -0
  134. package/lib/typescript/src/components/ui/Textarea.d.ts +65 -0
  135. package/lib/typescript/src/components/ui/Textarea.d.ts.map +1 -0
  136. package/lib/typescript/src/components/ui/Theme-Toggle.d.ts +67 -0
  137. package/lib/typescript/src/components/ui/Theme-Toggle.d.ts.map +1 -0
  138. package/lib/typescript/src/components/ui/Toast.d.ts +56 -0
  139. package/lib/typescript/src/components/ui/Toast.d.ts.map +1 -0
  140. package/lib/typescript/src/components/ui/Toggle-Group.d.ts +49 -0
  141. package/lib/typescript/src/components/ui/Toggle-Group.d.ts.map +1 -0
  142. package/lib/typescript/src/components/ui/Toggle.d.ts +53 -0
  143. package/lib/typescript/src/components/ui/Toggle.d.ts.map +1 -0
  144. package/lib/typescript/src/components/ui/Tooltip.d.ts +51 -0
  145. package/lib/typescript/src/components/ui/Tooltip.d.ts.map +1 -0
  146. package/lib/typescript/src/components/ui/index.d.ts +44 -0
  147. package/lib/typescript/src/components/ui/index.d.ts.map +1 -0
  148. package/lib/typescript/src/index.d.ts +11 -0
  149. package/lib/typescript/src/index.d.ts.map +1 -0
  150. package/lib/typescript/src/lib/ThemeProvider.d.ts +137 -0
  151. package/lib/typescript/src/lib/ThemeProvider.d.ts.map +1 -0
  152. package/lib/typescript/src/lib/cornerRadius.d.ts +112 -0
  153. package/lib/typescript/src/lib/cornerRadius.d.ts.map +1 -0
  154. package/lib/typescript/src/lib/fonts.d.ts +21 -0
  155. package/lib/typescript/src/lib/fonts.d.ts.map +1 -0
  156. package/lib/typescript/src/lib/slot-helpers.d.ts +32 -0
  157. package/lib/typescript/src/lib/slot-helpers.d.ts.map +1 -0
  158. package/lib/typescript/src/lib/theme.d.ts +87 -0
  159. package/lib/typescript/src/lib/theme.d.ts.map +1 -0
  160. package/lib/typescript/src/lib/utils.d.ts +111 -0
  161. package/lib/typescript/src/lib/utils.d.ts.map +1 -0
  162. package/nativewind-env.d.ts +7 -0
  163. package/package.json +15 -2
  164. package/src/components/ui/Accordion.tsx +3 -1
  165. package/src/components/ui/Alert-Dialog.tsx +5 -3
  166. package/src/components/ui/Alert.tsx +7 -4
  167. package/src/components/ui/AppBar.tsx +6 -2
  168. package/src/components/ui/Avatar.tsx +10 -6
  169. package/src/components/ui/Bottom-Sheet.tsx +10 -2
  170. package/src/components/ui/Context-Menu.tsx +15 -4
  171. package/src/components/ui/Custom-Card.tsx +6 -1
  172. package/src/components/ui/Dialog.tsx +13 -3
  173. package/src/components/ui/Dropdown-Menu.tsx +8 -4
  174. package/src/components/ui/Input.tsx +12 -4
  175. package/src/components/ui/Menubar.tsx +13 -6
  176. package/src/components/ui/Native-Only-Animated-View.tsx +1 -1
  177. package/src/components/ui/NavBar.tsx +9 -3
  178. package/src/components/ui/Progress.tsx +4 -2
  179. package/src/components/ui/Select.tsx +18 -6
  180. package/src/components/ui/Separator.tsx +4 -2
  181. package/src/components/ui/Skeleton.tsx +5 -3
  182. package/src/components/ui/Slider.tsx +8 -2
  183. package/src/components/ui/Table.tsx +9 -7
  184. package/src/components/ui/Text.tsx +1 -6
  185. package/src/components/ui/Textarea.tsx +15 -4
  186. package/src/components/ui/Theme-Toggle.tsx +7 -3
  187. package/src/components/ui/Toast.tsx +6 -3
  188. package/src/index.tsx +4 -0
  189. package/src/lib/slot-helpers.ts +57 -0
  190. package/src/types/components.d.ts +38 -0
  191. package/src/types/global.d.ts +178 -4
  192. 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
+ }
@@ -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
- interface AnimatedProps {
29
- children?: React.ReactNode;
30
- className?: string;
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 {