@campxdev/react-native-blueprint 0.1.0
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/LICENSE +20 -0
- package/README.md +358 -0
- package/lib/module/app/_layout.js +23 -0
- package/lib/module/app/_layout.js.map +1 -0
- package/lib/module/assets/icons/weather_icons/drizzle.png +0 -0
- package/lib/module/assets/icons/weather_icons/foggy.png +0 -0
- package/lib/module/assets/icons/weather_icons/freezing_rain.png +0 -0
- package/lib/module/assets/icons/weather_icons/partly_cloudy.png +0 -0
- package/lib/module/assets/icons/weather_icons/rainy.png +0 -0
- package/lib/module/assets/icons/weather_icons/showers.png +0 -0
- package/lib/module/assets/icons/weather_icons/sunny_weather.png +0 -0
- package/lib/module/assets/icons/weather_icons/thunderstorm.png +0 -0
- package/lib/module/assets/icons/weather_icons/thunderstorm_hail.png +0 -0
- package/lib/module/components/theme-config.js +265 -0
- package/lib/module/components/theme-config.js.map +1 -0
- package/lib/module/components/ui/Accordion.js +228 -0
- package/lib/module/components/ui/Accordion.js.map +1 -0
- package/lib/module/components/ui/Alert-Dialog.js +266 -0
- package/lib/module/components/ui/Alert-Dialog.js.map +1 -0
- package/lib/module/components/ui/Alert.js +107 -0
- package/lib/module/components/ui/Alert.js.map +1 -0
- package/lib/module/components/ui/AppBar.js +403 -0
- package/lib/module/components/ui/AppBar.js.map +1 -0
- package/lib/module/components/ui/Aspect-Ratio.js +27 -0
- package/lib/module/components/ui/Aspect-Ratio.js.map +1 -0
- package/lib/module/components/ui/Avatar.js +97 -0
- package/lib/module/components/ui/Avatar.js.map +1 -0
- package/lib/module/components/ui/Badge.js +127 -0
- package/lib/module/components/ui/Badge.js.map +1 -0
- package/lib/module/components/ui/Bottom-Sheet.js +144 -0
- package/lib/module/components/ui/Bottom-Sheet.js.map +1 -0
- package/lib/module/components/ui/Button.js +88 -0
- package/lib/module/components/ui/Button.js.map +1 -0
- package/lib/module/components/ui/Card.js +176 -0
- package/lib/module/components/ui/Card.js.map +1 -0
- package/lib/module/components/ui/Checkbox.js +65 -0
- package/lib/module/components/ui/Checkbox.js.map +1 -0
- package/lib/module/components/ui/Collapsible.js +42 -0
- package/lib/module/components/ui/Collapsible.js.map +1 -0
- package/lib/module/components/ui/Context-Menu.js +287 -0
- package/lib/module/components/ui/Context-Menu.js.map +1 -0
- package/lib/module/components/ui/Custom-Card.js +202 -0
- package/lib/module/components/ui/Custom-Card.js.map +1 -0
- package/lib/module/components/ui/Dialog.js +202 -0
- package/lib/module/components/ui/Dialog.js.map +1 -0
- package/lib/module/components/ui/Dropdown-Menu.js +421 -0
- package/lib/module/components/ui/Dropdown-Menu.js.map +1 -0
- package/lib/module/components/ui/Floating-Action.js +50 -0
- package/lib/module/components/ui/Floating-Action.js.map +1 -0
- package/lib/module/components/ui/Greeting-Card.js +392 -0
- package/lib/module/components/ui/Greeting-Card.js.map +1 -0
- package/lib/module/components/ui/Hover-Card.js +96 -0
- package/lib/module/components/ui/Hover-Card.js.map +1 -0
- package/lib/module/components/ui/Icon.js +73 -0
- package/lib/module/components/ui/Icon.js.map +1 -0
- package/lib/module/components/ui/Input.js +74 -0
- package/lib/module/components/ui/Input.js.map +1 -0
- package/lib/module/components/ui/Label.js +44 -0
- package/lib/module/components/ui/Label.js.map +1 -0
- package/lib/module/components/ui/Menubar.js +375 -0
- package/lib/module/components/ui/Menubar.js.map +1 -0
- package/lib/module/components/ui/Native-Only-Animated-View.js +41 -0
- package/lib/module/components/ui/Native-Only-Animated-View.js.map +1 -0
- package/lib/module/components/ui/NavBar.js +352 -0
- package/lib/module/components/ui/NavBar.js.map +1 -0
- package/lib/module/components/ui/Popover.js +101 -0
- package/lib/module/components/ui/Popover.js.map +1 -0
- package/lib/module/components/ui/Progress.js +124 -0
- package/lib/module/components/ui/Progress.js.map +1 -0
- package/lib/module/components/ui/Radio-Group.js +75 -0
- package/lib/module/components/ui/Radio-Group.js.map +1 -0
- package/lib/module/components/ui/Select.js +269 -0
- package/lib/module/components/ui/Select.js.map +1 -0
- package/lib/module/components/ui/Separator.js +58 -0
- package/lib/module/components/ui/Separator.js.map +1 -0
- package/lib/module/components/ui/SizedBox.js +101 -0
- package/lib/module/components/ui/SizedBox.js.map +1 -0
- package/lib/module/components/ui/Skeleton.js +57 -0
- package/lib/module/components/ui/Skeleton.js.map +1 -0
- package/lib/module/components/ui/Slider.js +169 -0
- package/lib/module/components/ui/Slider.js.map +1 -0
- package/lib/module/components/ui/Switch.js +55 -0
- package/lib/module/components/ui/Switch.js.map +1 -0
- package/lib/module/components/ui/Table.js +150 -0
- package/lib/module/components/ui/Table.js.map +1 -0
- package/lib/module/components/ui/Tabs.js +106 -0
- package/lib/module/components/ui/Tabs.js.map +1 -0
- package/lib/module/components/ui/Text.js +69 -0
- package/lib/module/components/ui/Text.js.map +1 -0
- package/lib/module/components/ui/Textarea.js +88 -0
- package/lib/module/components/ui/Textarea.js.map +1 -0
- package/lib/module/components/ui/Theme-Toggle.js +156 -0
- package/lib/module/components/ui/Theme-Toggle.js.map +1 -0
- package/lib/module/components/ui/Toast.js +101 -0
- package/lib/module/components/ui/Toast.js.map +1 -0
- package/lib/module/components/ui/Toggle-Group.js +129 -0
- package/lib/module/components/ui/Toggle-Group.js.map +1 -0
- package/lib/module/components/ui/Toggle.js +106 -0
- package/lib/module/components/ui/Toggle.js.map +1 -0
- package/lib/module/components/ui/Tooltip.js +106 -0
- package/lib/module/components/ui/Tooltip.js.map +1 -0
- package/lib/module/components/ui/index.js +45 -0
- package/lib/module/components/ui/index.js.map +1 -0
- package/lib/module/index.js +19 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/lib/ThemeProvider.js +173 -0
- package/lib/module/lib/ThemeProvider.js.map +1 -0
- package/lib/module/lib/cornerRadius.js +164 -0
- package/lib/module/lib/cornerRadius.js.map +1 -0
- package/lib/module/lib/fonts.js +25 -0
- package/lib/module/lib/fonts.js.map +1 -0
- package/lib/module/lib/theme.js +212 -0
- package/lib/module/lib/theme.js.map +1 -0
- package/lib/module/lib/utils.js +137 -0
- package/lib/module/lib/utils.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/package.json +208 -0
- package/src/app/_layout.tsx +25 -0
- package/src/assets/icons/weather_icons/drizzle.png +0 -0
- package/src/assets/icons/weather_icons/foggy.png +0 -0
- package/src/assets/icons/weather_icons/freezing_rain.png +0 -0
- package/src/assets/icons/weather_icons/partly_cloudy.png +0 -0
- package/src/assets/icons/weather_icons/rainy.png +0 -0
- package/src/assets/icons/weather_icons/showers.png +0 -0
- package/src/assets/icons/weather_icons/sunny_weather.png +0 -0
- package/src/assets/icons/weather_icons/thunderstorm.png +0 -0
- package/src/assets/icons/weather_icons/thunderstorm_hail.png +0 -0
- package/src/components/theme-config.ts +331 -0
- package/src/components/ui/Accordion.tsx +253 -0
- package/src/components/ui/Alert-Dialog.tsx +295 -0
- package/src/components/ui/Alert.tsx +137 -0
- package/src/components/ui/AppBar.tsx +551 -0
- package/src/components/ui/Aspect-Ratio.tsx +25 -0
- package/src/components/ui/Avatar.tsx +103 -0
- package/src/components/ui/Badge.tsx +121 -0
- package/src/components/ui/Bottom-Sheet.tsx +224 -0
- package/src/components/ui/Button.tsx +100 -0
- package/src/components/ui/Card.tsx +185 -0
- package/src/components/ui/Checkbox.tsx +81 -0
- package/src/components/ui/Collapsible.tsx +40 -0
- package/src/components/ui/Context-Menu.tsx +407 -0
- package/src/components/ui/Custom-Card.tsx +226 -0
- package/src/components/ui/Dialog.tsx +240 -0
- package/src/components/ui/Dropdown-Menu.tsx +544 -0
- package/src/components/ui/Floating-Action.tsx +54 -0
- package/src/components/ui/Greeting-Card.tsx +471 -0
- package/src/components/ui/Hover-Card.tsx +101 -0
- package/src/components/ui/Icon.tsx +75 -0
- package/src/components/ui/Input.tsx +90 -0
- package/src/components/ui/Label.tsx +48 -0
- package/src/components/ui/Menubar.tsx +509 -0
- package/src/components/ui/Native-Only-Animated-View.tsx +37 -0
- package/src/components/ui/NavBar.tsx +397 -0
- package/src/components/ui/Popover.tsx +110 -0
- package/src/components/ui/Progress.tsx +138 -0
- package/src/components/ui/Radio-Group.tsx +79 -0
- package/src/components/ui/Select.tsx +344 -0
- package/src/components/ui/Separator.tsx +68 -0
- package/src/components/ui/SizedBox.tsx +116 -0
- package/src/components/ui/Skeleton.tsx +55 -0
- package/src/components/ui/Slider.tsx +222 -0
- package/src/components/ui/Switch.tsx +67 -0
- package/src/components/ui/Table.tsx +170 -0
- package/src/components/ui/Tabs.tsx +119 -0
- package/src/components/ui/Text.tsx +73 -0
- package/src/components/ui/Textarea.tsx +93 -0
- package/src/components/ui/Theme-Toggle.tsx +204 -0
- package/src/components/ui/Toast.tsx +127 -0
- package/src/components/ui/Toggle-Group.tsx +160 -0
- package/src/components/ui/Toggle.tsx +122 -0
- package/src/components/ui/Tooltip.tsx +117 -0
- package/src/components/ui/index.ts +42 -0
- package/src/index.tsx +24 -0
- package/src/lib/ThemeProvider.tsx +204 -0
- package/src/lib/cornerRadius.ts +160 -0
- package/src/lib/fonts.ts +28 -0
- package/src/lib/theme.ts +151 -0
- package/src/lib/utils.ts +146 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Utility function to merge Tailwind CSS classes with proper precedence
|
|
8
|
+
*
|
|
9
|
+
* Combines clsx (for conditional classes) and tailwind-merge (for deduplication)
|
|
10
|
+
* to create a single, optimized class string. Later classes override earlier ones.
|
|
11
|
+
*
|
|
12
|
+
* @param {...ClassValue[]} inputs - Class values to merge (strings, objects, arrays)
|
|
13
|
+
* @returns {string} Merged and deduplicated class string
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* // Basic usage
|
|
18
|
+
* cn('px-2 py-1', 'px-4') // => 'py-1 px-4'
|
|
19
|
+
*
|
|
20
|
+
* // With conditionals
|
|
21
|
+
* cn('text-base', isDark && 'text-white', 'font-bold')
|
|
22
|
+
* // => 'text-base text-white font-bold' (if isDark is true)
|
|
23
|
+
*
|
|
24
|
+
* // With objects
|
|
25
|
+
* cn({
|
|
26
|
+
* 'bg-primary': isPrimary,
|
|
27
|
+
* 'bg-secondary': !isPrimary
|
|
28
|
+
* })
|
|
29
|
+
*
|
|
30
|
+
* // Common component pattern
|
|
31
|
+
* cn('base-classes', variant === 'large' && 'large-classes', className)
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export function cn(...inputs) {
|
|
35
|
+
return twMerge(clsx(inputs));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Applies dark mode classes with optional runtime control
|
|
40
|
+
*
|
|
41
|
+
* Provides three modes of operation:
|
|
42
|
+
* 1. Static mode (darkMode undefined): Returns classes with `dark:` prefix for automatic switching
|
|
43
|
+
* 2. Dark mode (darkMode true): Strips `dark:` prefix and returns only dark classes
|
|
44
|
+
* 3. Light mode (darkMode false): Returns only base classes
|
|
45
|
+
*
|
|
46
|
+
* This function is useful when you need to programmatically control dark mode
|
|
47
|
+
* instead of relying on Tailwind's automatic dark mode detection.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} baseClasses - Classes to apply in light mode
|
|
50
|
+
* @param {string} darkClasses - Classes to apply in dark mode (with or without `dark:` prefix)
|
|
51
|
+
* @param {boolean} [darkMode] - Optional dark mode override (true/false/undefined)
|
|
52
|
+
* @returns {string} Merged class string based on mode
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* // Static mode - use Tailwind's automatic detection
|
|
57
|
+
* cnWithDark('bg-white', 'dark:bg-black')
|
|
58
|
+
* // => 'bg-white dark:bg-black'
|
|
59
|
+
*
|
|
60
|
+
* // Programmatic dark mode
|
|
61
|
+
* const { isDark } = useTheme();
|
|
62
|
+
* cnWithDark('bg-white', 'dark:bg-black', isDark)
|
|
63
|
+
* // => 'bg-black' (if isDark is true)
|
|
64
|
+
* // => 'bg-white' (if isDark is false)
|
|
65
|
+
*
|
|
66
|
+
* // With multiple classes
|
|
67
|
+
* cnWithDark(
|
|
68
|
+
* 'bg-white text-black border-gray-200',
|
|
69
|
+
* 'dark:bg-black dark:text-white dark:border-gray-800',
|
|
70
|
+
* isDark
|
|
71
|
+
* )
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @see {@link cn} for basic class merging
|
|
75
|
+
* @see {@link useTheme} for accessing theme state
|
|
76
|
+
*/
|
|
77
|
+
export function cnWithDark(baseClasses, darkClasses, darkMode) {
|
|
78
|
+
if (darkMode === undefined) {
|
|
79
|
+
// No override provided, use standard dark: prefixed classes
|
|
80
|
+
return cn(baseClasses, darkClasses);
|
|
81
|
+
}
|
|
82
|
+
if (darkMode) {
|
|
83
|
+
// Dark mode enabled - apply dark classes without the dark: prefix
|
|
84
|
+
const processedDarkClasses = darkClasses.split(' ').map(cls => cls.replace(/^dark:/, '')).join(' ');
|
|
85
|
+
return cn(processedDarkClasses);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Dark mode disabled - only use base classes
|
|
89
|
+
return cn(baseClasses);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Get color value based on theme mode
|
|
94
|
+
*
|
|
95
|
+
* Simple utility to select between light and dark color values based on the
|
|
96
|
+
* current theme. Primarily used for native platforms where Tailwind CSS
|
|
97
|
+
* classes don't work with inline styles.
|
|
98
|
+
*
|
|
99
|
+
* @param {string} lightColor - Color value for light mode (CSS color, HSL, RGB, hex)
|
|
100
|
+
* @param {string} darkColor - Color value for dark mode (CSS color, HSL, RGB, hex)
|
|
101
|
+
* @param {boolean} [darkMode] - Whether dark mode is active (defaults to light if undefined)
|
|
102
|
+
* @returns {string} The appropriate color value for the current mode
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```tsx
|
|
106
|
+
* import { useTheme } from './ThemeProvider';
|
|
107
|
+
*
|
|
108
|
+
* function MyComponent() {
|
|
109
|
+
* const { isDark } = useTheme();
|
|
110
|
+
*
|
|
111
|
+
* // Get color for inline styles
|
|
112
|
+
* const textColor = getThemeColor('#000000', '#ffffff', isDark);
|
|
113
|
+
* const bgColor = getThemeColor('hsl(0, 0%, 100%)', 'hsl(0, 0%, 10%)', isDark);
|
|
114
|
+
*
|
|
115
|
+
* return (
|
|
116
|
+
* <View style={{ backgroundColor: bgColor }}>
|
|
117
|
+
* <NativeText style={{ color: textColor }}>
|
|
118
|
+
* Theme-aware text
|
|
119
|
+
* </NativeText>
|
|
120
|
+
* </View>
|
|
121
|
+
* );
|
|
122
|
+
* }
|
|
123
|
+
*
|
|
124
|
+
* // Without theme context (defaults to light)
|
|
125
|
+
* const color = getThemeColor('#000', '#fff'); // => '#000'
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* @see {@link useTheme} for accessing theme state
|
|
129
|
+
* @see {@link getThemeColorValue} from theme-config for more advanced usage
|
|
130
|
+
*/
|
|
131
|
+
export function getThemeColor(lightColor, darkColor, darkMode) {
|
|
132
|
+
if (darkMode === undefined) {
|
|
133
|
+
return lightColor; // Default to light if no preference
|
|
134
|
+
}
|
|
135
|
+
return darkMode ? darkColor : lightColor;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["clsx","twMerge","cn","inputs","cnWithDark","baseClasses","darkClasses","darkMode","undefined","processedDarkClasses","split","map","cls","replace","join","getThemeColor","lightColor","darkColor"],"sourceRoot":"../../../src","sources":["lib/utils.ts"],"mappings":";;AAAA,SAASA,IAAI,QAAyB,MAAM;AAC5C,SAASC,OAAO,QAAQ,gBAAgB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,EAAEA,CAAC,GAAGC,MAAoB,EAAE;EAC1C,OAAOF,OAAO,CAACD,IAAI,CAACG,MAAM,CAAC,CAAC;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CACxBC,WAAmB,EACnBC,WAAmB,EACnBC,QAAkB,EACV;EACR,IAAIA,QAAQ,KAAKC,SAAS,EAAE;IAC1B;IACA,OAAON,EAAE,CAACG,WAAW,EAAEC,WAAW,CAAC;EACrC;EAEA,IAAIC,QAAQ,EAAE;IACZ;IACA,MAAME,oBAAoB,GAAGH,WAAW,CACrCI,KAAK,CAAC,GAAG,CAAC,CACVC,GAAG,CAAEC,GAAG,IAAKA,GAAG,CAACC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CACvCC,IAAI,CAAC,GAAG,CAAC;IACZ,OAAOZ,EAAE,CAACO,oBAAoB,CAAC;EACjC;;EAEA;EACA,OAAOP,EAAE,CAACG,WAAW,CAAC;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,aAAaA,CAC3BC,UAAkB,EAClBC,SAAiB,EACjBV,QAAkB,EACV;EACR,IAAIA,QAAQ,KAAKC,SAAS,EAAE;IAC1B,OAAOQ,UAAU,CAAC,CAAC;EACrB;EACA,OAAOT,QAAQ,GAAGU,SAAS,GAAGD,UAAU;AAC1C","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/package.json
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@campxdev/react-native-blueprint",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "This is a react-native package for mobile apps",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
23
|
+
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
29
|
+
"!**/__tests__",
|
|
30
|
+
"!**/__fixtures__",
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"example": "yarn workspace react-native-blueprint-example",
|
|
36
|
+
"test": "jest",
|
|
37
|
+
"typecheck": "tsc",
|
|
38
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
39
|
+
"clean": "del-cli lib",
|
|
40
|
+
"prepare": "bob build --target module",
|
|
41
|
+
"build:full": "bob build",
|
|
42
|
+
"release": "release-it --only-version"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"react-native",
|
|
46
|
+
"ios",
|
|
47
|
+
"android"
|
|
48
|
+
],
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/campx-org/react-native-blueprint.git"
|
|
52
|
+
},
|
|
53
|
+
"author": "CAMPX <satya@campx.in> (https://github.com/Sri-Satya-M)",
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/campx-org/react-native-blueprint/issues"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://github.com/campx-org/react-native-blueprint#readme",
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"registry": "https://registry.npmjs.org/",
|
|
61
|
+
"access": "public"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@babel/core": "^7.28.4",
|
|
65
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
66
|
+
"@eslint/compat": "^1.3.2",
|
|
67
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
68
|
+
"@eslint/js": "^9.35.0",
|
|
69
|
+
"@evilmartians/lefthook": "^1.12.3",
|
|
70
|
+
"@react-native-community/cli": "latest",
|
|
71
|
+
"@react-native/babel-preset": "0.81.1",
|
|
72
|
+
"@react-native/eslint-config": "^0.81.1",
|
|
73
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
74
|
+
"@types/jest": "^29.5.14",
|
|
75
|
+
"@types/react": "^19.1.12",
|
|
76
|
+
"commitlint": "^19.8.1",
|
|
77
|
+
"del-cli": "^6.0.0",
|
|
78
|
+
"eslint": "^9.35.0",
|
|
79
|
+
"eslint-config-prettier": "^10.1.8",
|
|
80
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
81
|
+
"jest": "^29.7.0",
|
|
82
|
+
"prettier": "^3.6.2",
|
|
83
|
+
"react": "19.1.0",
|
|
84
|
+
"react-native": "0.81.4",
|
|
85
|
+
"react-native-builder-bob": "^0.40.13",
|
|
86
|
+
"release-it": "^19.0.4",
|
|
87
|
+
"tailwindcss": "^3.4.17",
|
|
88
|
+
"typescript": "^5.9.2"
|
|
89
|
+
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"react": "*",
|
|
92
|
+
"react-native": "*"
|
|
93
|
+
},
|
|
94
|
+
"workspaces": [
|
|
95
|
+
"example"
|
|
96
|
+
],
|
|
97
|
+
"packageManager": "yarn@3.6.1",
|
|
98
|
+
"jest": {
|
|
99
|
+
"preset": "react-native",
|
|
100
|
+
"modulePathIgnorePatterns": [
|
|
101
|
+
"<rootDir>/example/node_modules",
|
|
102
|
+
"<rootDir>/lib/"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"commitlint": {
|
|
106
|
+
"extends": [
|
|
107
|
+
"@commitlint/config-conventional"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"release-it": {
|
|
111
|
+
"git": {
|
|
112
|
+
"commitMessage": "chore: release ${version}",
|
|
113
|
+
"tagName": "v${version}"
|
|
114
|
+
},
|
|
115
|
+
"npm": {
|
|
116
|
+
"publish": true
|
|
117
|
+
},
|
|
118
|
+
"github": {
|
|
119
|
+
"release": true
|
|
120
|
+
},
|
|
121
|
+
"plugins": {
|
|
122
|
+
"@release-it/conventional-changelog": {
|
|
123
|
+
"preset": {
|
|
124
|
+
"name": "angular"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"prettier": {
|
|
130
|
+
"quoteProps": "consistent",
|
|
131
|
+
"singleQuote": true,
|
|
132
|
+
"tabWidth": 2,
|
|
133
|
+
"trailingComma": "es5",
|
|
134
|
+
"useTabs": false
|
|
135
|
+
},
|
|
136
|
+
"react-native-builder-bob": {
|
|
137
|
+
"source": "src",
|
|
138
|
+
"output": "lib",
|
|
139
|
+
"targets": [
|
|
140
|
+
[
|
|
141
|
+
"module",
|
|
142
|
+
{
|
|
143
|
+
"esm": true
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
[
|
|
147
|
+
"typescript",
|
|
148
|
+
{
|
|
149
|
+
"project": "tsconfig.build.json"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"create-react-native-library": {
|
|
155
|
+
"languages": "js",
|
|
156
|
+
"type": "library",
|
|
157
|
+
"version": "0.54.5"
|
|
158
|
+
},
|
|
159
|
+
"dependencies": {
|
|
160
|
+
"@expo-google-fonts/heebo": "^0.4.2",
|
|
161
|
+
"@expo-google-fonts/poppins": "^0.4.1",
|
|
162
|
+
"@gorhom/bottom-sheet": "^5",
|
|
163
|
+
"@react-navigation/native": "^7.1.18",
|
|
164
|
+
"@rn-primitives/accordion": "^1.2.0",
|
|
165
|
+
"@rn-primitives/alert-dialog": "^1.2.0",
|
|
166
|
+
"@rn-primitives/aspect-ratio": "^1.2.0",
|
|
167
|
+
"@rn-primitives/avatar": "^1.2.0",
|
|
168
|
+
"@rn-primitives/checkbox": "^1.2.0",
|
|
169
|
+
"@rn-primitives/collapsible": "^1.2.0",
|
|
170
|
+
"@rn-primitives/context-menu": "^1.2.0",
|
|
171
|
+
"@rn-primitives/dialog": "^1.2.0",
|
|
172
|
+
"@rn-primitives/dropdown-menu": "^1.2.0",
|
|
173
|
+
"@rn-primitives/hover-card": "^1.2.0",
|
|
174
|
+
"@rn-primitives/label": "^1.2.0",
|
|
175
|
+
"@rn-primitives/menubar": "^1.2.0",
|
|
176
|
+
"@rn-primitives/popover": "^1.2.0",
|
|
177
|
+
"@rn-primitives/portal": "^1.2.0",
|
|
178
|
+
"@rn-primitives/progress": "^1.2.0",
|
|
179
|
+
"@rn-primitives/radio-group": "^1.2.0",
|
|
180
|
+
"@rn-primitives/select": "^1.2.0",
|
|
181
|
+
"@rn-primitives/separator": "^1.2.0",
|
|
182
|
+
"@rn-primitives/slider": "^1.2.0",
|
|
183
|
+
"@rn-primitives/slot": "^1.2.0",
|
|
184
|
+
"@rn-primitives/switch": "^1.2.0",
|
|
185
|
+
"@rn-primitives/tabs": "^1.2.0",
|
|
186
|
+
"@rn-primitives/toggle": "^1.2.0",
|
|
187
|
+
"@rn-primitives/toggle-group": "^1.2.0",
|
|
188
|
+
"@rn-primitives/tooltip": "^1.2.0",
|
|
189
|
+
"@rn-primitives/types": "^1.2.0",
|
|
190
|
+
"class-variance-authority": "^0.7.1",
|
|
191
|
+
"clsx": "^2.1.1",
|
|
192
|
+
"expo": "^54.0.12",
|
|
193
|
+
"expo-font": "^14.0.9",
|
|
194
|
+
"figma-squircle": "^1.1.0",
|
|
195
|
+
"lucide-react-native": "^0.486.0",
|
|
196
|
+
"nativewind": "^4.2.1",
|
|
197
|
+
"react-native-figma-squircle": "^0.4.0",
|
|
198
|
+
"react-native-floating-action": "^1.22.0",
|
|
199
|
+
"react-native-gesture-handler": "^2.28.0",
|
|
200
|
+
"react-native-reanimated": "^4.1.2",
|
|
201
|
+
"react-native-safe-area-context": "^5.6.1",
|
|
202
|
+
"react-native-screens": "^4.7.1",
|
|
203
|
+
"react-native-svg": "^15.14.0",
|
|
204
|
+
"react-native-worklets": "0.5.1",
|
|
205
|
+
"tailwind-merge": "^3.3.1",
|
|
206
|
+
"tailwindcss-animate": "^1.0.7"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import '../../global.css';
|
|
2
|
+
import { PortalHost } from '@rn-primitives/portal';
|
|
3
|
+
import { StatusBar } from 'react-native';
|
|
4
|
+
import { NAV_THEME } from '../lib/theme';
|
|
5
|
+
import { ThemeProvider } from '@react-navigation/native';
|
|
6
|
+
import { useColorScheme } from 'nativewind';
|
|
7
|
+
import type { ReactNode } from 'react';
|
|
8
|
+
|
|
9
|
+
interface RootLayoutProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default function RootLayout({ children }: RootLayoutProps) {
|
|
14
|
+
const { colorScheme } = useColorScheme();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<ThemeProvider value={NAV_THEME[colorScheme ?? 'light']}>
|
|
18
|
+
<StatusBar
|
|
19
|
+
barStyle={colorScheme === 'dark' ? 'light-content' : 'dark-content'}
|
|
20
|
+
/>
|
|
21
|
+
{children}
|
|
22
|
+
<PortalHost />
|
|
23
|
+
</ThemeProvider>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|