@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,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useColorScheme } from 'react-native';
|
|
5
|
+
import { useColorScheme as useNativeWindColorScheme } from 'nativewind';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Available theme modes for the application
|
|
9
|
+
* @typedef {'light' | 'dark' | 'system'} ThemeMode
|
|
10
|
+
* - `light`: Force light theme regardless of system preference
|
|
11
|
+
* - `dark`: Force dark theme regardless of system preference
|
|
12
|
+
* - `system`: Automatically follow device system theme preference (default)
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Context type for theme management
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
const ThemeContext = /*#__PURE__*/React.createContext(undefined);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Props for ThemeProvider component
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Theme Provider component that manages application theme state
|
|
28
|
+
*
|
|
29
|
+
* Provides theme context to all child components, enabling dark mode support
|
|
30
|
+
* throughout the application. Automatically responds to system theme changes
|
|
31
|
+
* when mode is set to 'system'.
|
|
32
|
+
*
|
|
33
|
+
* @component
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* // Basic usage with system theme
|
|
37
|
+
* function App() {
|
|
38
|
+
* return (
|
|
39
|
+
* <ThemeProvider>
|
|
40
|
+
* <YourApp />
|
|
41
|
+
* </ThemeProvider>
|
|
42
|
+
* );
|
|
43
|
+
* }
|
|
44
|
+
*
|
|
45
|
+
* // Start with dark mode
|
|
46
|
+
* function App() {
|
|
47
|
+
* return (
|
|
48
|
+
* <ThemeProvider defaultMode="dark">
|
|
49
|
+
* <YourApp />
|
|
50
|
+
* </ThemeProvider>
|
|
51
|
+
* );
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @param {ThemeProviderProps} props - Component props
|
|
56
|
+
* @returns {JSX.Element} Provider component wrapping children with theme context
|
|
57
|
+
*
|
|
58
|
+
* @see {@link useTheme} for accessing theme in child components
|
|
59
|
+
* @see {@link useThemeMode} for optional theme access without error
|
|
60
|
+
*/
|
|
61
|
+
export function ThemeProvider({
|
|
62
|
+
children,
|
|
63
|
+
defaultMode = 'system'
|
|
64
|
+
}) {
|
|
65
|
+
const systemColorScheme = useColorScheme();
|
|
66
|
+
const {
|
|
67
|
+
setColorScheme: setNativeWindColorScheme
|
|
68
|
+
} = useNativeWindColorScheme();
|
|
69
|
+
const [mode, setModeState] = React.useState(defaultMode);
|
|
70
|
+
const isDark = React.useMemo(() => {
|
|
71
|
+
if (mode === 'system') {
|
|
72
|
+
return systemColorScheme === 'dark';
|
|
73
|
+
}
|
|
74
|
+
return mode === 'dark';
|
|
75
|
+
}, [mode, systemColorScheme]);
|
|
76
|
+
|
|
77
|
+
// Sync with nativewind when mode or isDark changes
|
|
78
|
+
React.useEffect(() => {
|
|
79
|
+
if (mode === 'system') {
|
|
80
|
+
setNativeWindColorScheme(systemColorScheme === 'dark' ? 'dark' : 'light');
|
|
81
|
+
} else {
|
|
82
|
+
setNativeWindColorScheme(mode);
|
|
83
|
+
}
|
|
84
|
+
}, [mode, systemColorScheme, setNativeWindColorScheme]);
|
|
85
|
+
const setMode = React.useCallback(newMode => {
|
|
86
|
+
setModeState(newMode);
|
|
87
|
+
}, []);
|
|
88
|
+
const {
|
|
89
|
+
THEME
|
|
90
|
+
} = require('./theme');
|
|
91
|
+
const colors = React.useMemo(() => isDark ? THEME.dark : THEME.light, [isDark, THEME]);
|
|
92
|
+
const value = React.useMemo(() => ({
|
|
93
|
+
mode,
|
|
94
|
+
isDark,
|
|
95
|
+
setMode,
|
|
96
|
+
colors
|
|
97
|
+
}), [mode, isDark, setMode, colors]);
|
|
98
|
+
return /*#__PURE__*/_jsx(ThemeContext.Provider, {
|
|
99
|
+
value: value,
|
|
100
|
+
children: children
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Hook to access theme context and controls
|
|
106
|
+
*
|
|
107
|
+
* Provides access to the current theme state and methods to change the theme.
|
|
108
|
+
* Must be used within a ThemeProvider component tree.
|
|
109
|
+
*
|
|
110
|
+
* @returns {ThemeContextType} Theme context object
|
|
111
|
+
* @throws {Error} If used outside of ThemeProvider
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```tsx
|
|
115
|
+
* function MyComponent() {
|
|
116
|
+
* const { mode, isDark, setMode, colors } = useTheme();
|
|
117
|
+
*
|
|
118
|
+
* return (
|
|
119
|
+
* <View style={{ backgroundColor: colors.background }}>
|
|
120
|
+
* <Text style={{ color: colors.foreground }}>
|
|
121
|
+
* Current mode: {mode} (Dark: {isDark ? 'Yes' : 'No'})
|
|
122
|
+
* </Text>
|
|
123
|
+
* <Button onPress={() => setMode(isDark ? 'light' : 'dark')}>
|
|
124
|
+
* <Text>Toggle Theme</Text>
|
|
125
|
+
* </Button>
|
|
126
|
+
* </View>
|
|
127
|
+
* );
|
|
128
|
+
* }
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @see {@link ThemeProvider} for setup
|
|
132
|
+
* @see {@link useThemeMode} for optional access without error throwing
|
|
133
|
+
*/
|
|
134
|
+
export function useTheme() {
|
|
135
|
+
const context = React.useContext(ThemeContext);
|
|
136
|
+
if (context === undefined) {
|
|
137
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
138
|
+
}
|
|
139
|
+
return context;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Optional hook to get current dark mode state
|
|
144
|
+
*
|
|
145
|
+
* Similar to useTheme but only returns the isDark boolean and doesn't throw
|
|
146
|
+
* an error if used outside ThemeProvider. Useful for components that want
|
|
147
|
+
* to adapt to theme but don't require it.
|
|
148
|
+
*
|
|
149
|
+
* @returns {boolean | undefined} Whether dark mode is active, or undefined if no provider
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```tsx
|
|
153
|
+
* function OptionalThemedComponent() {
|
|
154
|
+
* const isDark = useThemeMode();
|
|
155
|
+
*
|
|
156
|
+
* // Component works with or without ThemeProvider
|
|
157
|
+
* const backgroundColor = isDark ? '#000' : '#fff';
|
|
158
|
+
*
|
|
159
|
+
* return (
|
|
160
|
+
* <View style={{ backgroundColor }}>
|
|
161
|
+
* <Text>This component adapts if theme is available</Text>
|
|
162
|
+
* </View>
|
|
163
|
+
* );
|
|
164
|
+
* }
|
|
165
|
+
* ```
|
|
166
|
+
*
|
|
167
|
+
* @see {@link useTheme} for full theme access (requires provider)
|
|
168
|
+
*/
|
|
169
|
+
export function useThemeMode() {
|
|
170
|
+
const context = React.useContext(ThemeContext);
|
|
171
|
+
return context?.isDark;
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useColorScheme","useNativeWindColorScheme","jsx","_jsx","ThemeContext","createContext","undefined","ThemeProvider","children","defaultMode","systemColorScheme","setColorScheme","setNativeWindColorScheme","mode","setModeState","useState","isDark","useMemo","useEffect","setMode","useCallback","newMode","THEME","require","colors","dark","light","value","Provider","useTheme","context","useContext","Error","useThemeMode"],"sourceRoot":"../../../src","sources":["lib/ThemeProvider.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,QAAQ,cAAc;AAC7C,SAASA,cAAc,IAAIC,wBAAwB,QAAQ,YAAY;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AAHA,SAAAC,GAAA,IAAAC,IAAA;AAeA,MAAMC,YAAY,gBAAGL,KAAK,CAACM,aAAa,CACtCC,SACF,CAAC;;AAED;AACA;AACA;;AAgBA;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,aAAaA,CAAC;EAC5BC,QAAQ;EACRC,WAAW,GAAG;AACI,CAAC,EAAE;EACrB,MAAMC,iBAAiB,GAAGV,cAAc,CAAC,CAAC;EAC1C,MAAM;IAAEW,cAAc,EAAEC;EAAyB,CAAC,GAChDX,wBAAwB,CAAC,CAAC;EAC5B,MAAM,CAACY,IAAI,EAAEC,YAAY,CAAC,GAAGf,KAAK,CAACgB,QAAQ,CAAYN,WAAW,CAAC;EAEnE,MAAMO,MAAM,GAAGjB,KAAK,CAACkB,OAAO,CAAC,MAAM;IACjC,IAAIJ,IAAI,KAAK,QAAQ,EAAE;MACrB,OAA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QA,CAAA,EAAG;EACzB,MAAMC,OAAO,GAAG/B,KAAK,CAACgC,UAAU,CAAC3B,YAAY,CAAC;EAC9C,IAAI0B,OAAO,KAAKxB,SAAS,EAAE;IACzB,MAAM,IAAI0B,KAAK,CAAC,8CAA8C,CAAC;EACjE;EACA,OAAOF,OAAO;AAChB;;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,OAAO,SAASG,YAAYA,CAAA,EAAwB;EAClD,MAAMH,OAAO,GAAG/B,KAAK,CAACgC,UAAU,CAAC3B,YAAY,CAAC;EAC9C,OAAO0B,OAAO,EAAEd,MAAM;AACxB","ignoreList":[]}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Corner Radius System
|
|
5
|
+
*
|
|
6
|
+
* Automatically calculates the appropriate corner radius based on element dimensions.
|
|
7
|
+
*
|
|
8
|
+
* Design Rule:
|
|
9
|
+
* - Elements < 80px height → 12px radius
|
|
10
|
+
* - Elements ≥ 80px height → 20px radius
|
|
11
|
+
* - All corners use 100% smoothing (Apple-style squircles)
|
|
12
|
+
*
|
|
13
|
+
* Examples:
|
|
14
|
+
* - Button (50px height) → 12px
|
|
15
|
+
* - Chip (24px height) → 12px
|
|
16
|
+
* - Checkbox (16px height) → 4px (special case for very small)
|
|
17
|
+
* - Small card (60px height) → 12px
|
|
18
|
+
* - Large card (200px height) → 20px
|
|
19
|
+
* - Dialog (400px height) → 20px
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Primitive radius values from your design system
|
|
24
|
+
* Your exact values: 0, 2, 4, 8, 12, 20, 24, 32, 48
|
|
25
|
+
*/
|
|
26
|
+
export const RADIUS = {
|
|
27
|
+
R0: 0,
|
|
28
|
+
// None
|
|
29
|
+
R1: 2,
|
|
30
|
+
// Tiny
|
|
31
|
+
R2: 4,
|
|
32
|
+
// Extra small
|
|
33
|
+
R3: 8,
|
|
34
|
+
// Small
|
|
35
|
+
R4: 12,
|
|
36
|
+
// Medium
|
|
37
|
+
R5: 20,
|
|
38
|
+
// Large
|
|
39
|
+
R6: 24,
|
|
40
|
+
// Extra large
|
|
41
|
+
R7: 32,
|
|
42
|
+
// 2X large
|
|
43
|
+
R8: 48 // 3X large / Pill
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Height thresholds for radius calculation
|
|
48
|
+
*/
|
|
49
|
+
const HEIGHT_THRESHOLDS = {
|
|
50
|
+
TINY: 20,
|
|
51
|
+
// < 20px height → Use R2 (4px) for very small elements
|
|
52
|
+
SMALL: 80,
|
|
53
|
+
// < 80px height → Use R4 (12px)
|
|
54
|
+
LARGE: 80 // ≥ 80px height → Use R5 (20px)
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Calculate corner radius based on element height
|
|
59
|
+
*
|
|
60
|
+
* @param height - Element height in pixels
|
|
61
|
+
* @returns Corner radius in pixels
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* // Button (50px height)
|
|
66
|
+
* const radius = getRadiusForHeight(50); // Returns 12
|
|
67
|
+
*
|
|
68
|
+
* // Checkbox (16px height)
|
|
69
|
+
* const radius = getRadiusForHeight(16); // Returns 4
|
|
70
|
+
*
|
|
71
|
+
* // Card (160px height)
|
|
72
|
+
* const radius = getRadiusForHeight(160); // Returns 20
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export function getRadiusForHeight(height) {
|
|
76
|
+
if (height < HEIGHT_THRESHOLDS.TINY) {
|
|
77
|
+
return RADIUS.R2; // 4px for very small elements (checkbox, badge, etc.)
|
|
78
|
+
}
|
|
79
|
+
if (height < HEIGHT_THRESHOLDS.SMALL) {
|
|
80
|
+
return RADIUS.R4; // 12px for small-medium elements (button, chip, input, etc.)
|
|
81
|
+
}
|
|
82
|
+
return RADIUS.R5; // 20px for large elements (card, dialog, sheet, etc.)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Calculate corner radius based on smallest dimension (width or height)
|
|
87
|
+
* Useful for square or nearly-square elements
|
|
88
|
+
*
|
|
89
|
+
* @param width - Element width in pixels
|
|
90
|
+
* @param height - Element height in pixels
|
|
91
|
+
* @returns Corner radius in pixels
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```tsx
|
|
95
|
+
* // Square checkbox (16×16)
|
|
96
|
+
* const radius = getRadiusForDimensions(16, 16); // Returns 4
|
|
97
|
+
*
|
|
98
|
+
* // Wide button (200×50)
|
|
99
|
+
* const radius = getRadiusForDimensions(200, 50); // Returns 12 (based on height)
|
|
100
|
+
*
|
|
101
|
+
* // Tall card (300×200)
|
|
102
|
+
* const radius = getRadiusForDimensions(300, 200); // Returns 20 (based on width)
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export function getRadiusForDimensions(width, height) {
|
|
106
|
+
const smallestDimension = Math.min(width, height);
|
|
107
|
+
return getRadiusForHeight(smallestDimension);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Get corner radius with custom thresholds
|
|
112
|
+
* Advanced usage when you need different breakpoints
|
|
113
|
+
*
|
|
114
|
+
* @param height - Element height in pixels
|
|
115
|
+
* @param options - Custom threshold options
|
|
116
|
+
* @returns Corner radius in pixels
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```tsx
|
|
120
|
+
* // Use 20px radius for elements ≥ 100px instead of 80px
|
|
121
|
+
* const radius = getCustomRadius(90, { largeThreshold: 100 });
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export function getCustomRadius(height, options) {
|
|
125
|
+
const {
|
|
126
|
+
tinyThreshold = HEIGHT_THRESHOLDS.TINY,
|
|
127
|
+
smallThreshold = HEIGHT_THRESHOLDS.SMALL,
|
|
128
|
+
tinyRadius = RADIUS.R2,
|
|
129
|
+
smallRadius = RADIUS.R4,
|
|
130
|
+
largeRadius = RADIUS.R5
|
|
131
|
+
} = options || {};
|
|
132
|
+
if (height < tinyThreshold) {
|
|
133
|
+
return tinyRadius;
|
|
134
|
+
}
|
|
135
|
+
if (height < smallThreshold) {
|
|
136
|
+
return smallRadius;
|
|
137
|
+
}
|
|
138
|
+
return largeRadius;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Corner smoothing value (0-1)
|
|
143
|
+
* 1.0 = 100% smoothing (Apple-style squircles)
|
|
144
|
+
*/
|
|
145
|
+
export const CORNER_SMOOTHING = 1.0;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Preset radius values for common use cases
|
|
149
|
+
* Use these when you know the exact size you want
|
|
150
|
+
*/
|
|
151
|
+
export const RADIUS_PRESET = {
|
|
152
|
+
none: RADIUS.R0,
|
|
153
|
+
// 0px - No radius
|
|
154
|
+
tiny: RADIUS.R2,
|
|
155
|
+
// 4px - Checkbox, badge, tooltip
|
|
156
|
+
small: RADIUS.R4,
|
|
157
|
+
// 12px - Button, chip, input, small card
|
|
158
|
+
large: RADIUS.R5,
|
|
159
|
+
// 20px - Large card, dialog, sheet
|
|
160
|
+
pill: RADIUS.R6,
|
|
161
|
+
// 48px - Fully rounded
|
|
162
|
+
circle: 9999 // Full circle - Avatar, radio button
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=cornerRadius.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RADIUS","R0","R1","R2","R3","R4","R5","R6","R7","R8","HEIGHT_THRESHOLDS","TINY","SMALL","LARGE","getRadiusForHeight","height","getRadiusForDimensions","width","smallestDimension","Math","min","getCustomRadius","options","tinyThreshold","smallThreshold","tinyRadius","smallRadius","largeRadius","CORNER_SMOOTHING","RADIUS_PRESET","none","tiny","small","large","pill","circle"],"sourceRoot":"../../../src","sources":["lib/cornerRadius.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMA,MAAM,GAAG;EACpBC,EAAE,EAAE,CAAC;EAAE;EACPC,EAAE,EAAE,CAAC;EAAE;EACPC,EAAE,EAAE,CAAC;EAAE;EACPC,EAAE,EAAE,CAAC;EAAE;EACPC,EAAE,EAAE,EAAE;EAAE;EACRC,EAAE,EAAE,EAAE;EAAE;EACRC,EAAE,EAAE,EAAE;EAAE;EACRC,EAAE,EAAE,EAAE;EAAE;EACRC,EAAE,EAAE,EAAE,CAAE;AACV,CAAU;;AAEV;AACA;AACA;AACA,MAAMC,iBAAiB,GAAG;EACxBC,IAAI,EAAE,EAAE;EAAE;EACVC,KAAK,EAAE,EAAE;EAAE;EACXC,KAAK,EAAE,EAAE,CAAE;AACb,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACC,MAAc,EAAU;EACzD,IAAIA,MAAM,GAAGL,iBAAiB,CAACC,IAAI,EAAE;IACnC,OAAOX,MAAM,CAACG,EAAE,CAAC,CAAC;EACpB;EAEA,IAAIY,MAAM,GAAGL,iBAAiB,CAACE,KAAK,EAAE;IACpC,OAAOZ,MAAM,CAACK,EAAE,CAAC,CAAC;EACpB;EAEA,OAAOL,MAAM,CAACM,EAAE,CAAC,CAAC;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,sBAAsBA,CAACC,KAAa,EAAEF,MAAc,EAAU;EAC5E,MAAMG,iBAAiB,GAAGC,IAAI,CAACC,GAAG,CAACH,KAAK,EAAEF,MAAM,CAAC;EACjD,OAAOD,kBAAkB,CAACI,iBAAiB,CAAC;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,eAAeA,CAC7BN,MAAc,EACdO,OAMC,EACO;EACR,MAAM;IACJC,aAAa,GAAGb,iBAAiB,CAACC,IAAI;IACtCa,cAAc,GAAGd,iBAAiB,CAACE,KAAK;IACxCa,UAAU,GAAGzB,MAAM,CAACG,EAAE;IACtBuB,WAAW,GAAG1B,MAAM,CAACK,EAAE;IACvBsB,WAAW,GAAG3B,MAAM,CAACM;EACvB,CAAC,GAAGgB,OAAO,IAAI,CAAC,CAAC;EAEjB,IAAIP,MAAM,GAAGQ,aAAa,EAAE;IAC1B,OAAOE,UAAU;EACnB;EAEA,IAAIV,MAAM,GAAGS,cAAc,EAAE;IAC3B,OAAOE,WAAW;EACpB;EAEA,OAAOC,WAAW;AACpB;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,GAAG;;AAEnC;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG;EAC3BC,IAAI,EAAE9B,MAAM,CAACC,EAAE;EAAE;EACjB8B,IAAI,EAAE/B,MAAM,CAACG,EAAE;EAAE;EACjB6B,KAAK,EAAEhC,MAAM,CAACK,EAAE;EAAE;EAClB4B,KAAK,EAAEjC,MAAM,CAACM,EAAE;EAAE;EAClB4B,IAAI,EAAElC,MAAM,CAACO,EAAE;EAAE;EACjB4B,MAAM,EAAE,IAAI,CAAE;AAChB,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Poppins_400Regular, Poppins_600SemiBold, Poppins_800ExtraBold } from '@expo-google-fonts/poppins';
|
|
4
|
+
import { Heebo_400Regular, Heebo_600SemiBold } from '@expo-google-fonts/heebo';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Font configuration for CampX Design System
|
|
8
|
+
*
|
|
9
|
+
* Fonts:
|
|
10
|
+
* - Poppins: Used for headings, buttons, labels, subtitles
|
|
11
|
+
* - Heebo: Used for body text, inputs, captions
|
|
12
|
+
*
|
|
13
|
+
* Weights:
|
|
14
|
+
* - 400 (Regular): Body text, labels, captions
|
|
15
|
+
* - 600 (Semi Bold): Subtitles, buttons, emphasized body
|
|
16
|
+
* - 800 (Extra Bold): Headings
|
|
17
|
+
*/
|
|
18
|
+
export const fonts = {
|
|
19
|
+
Poppins_400Regular,
|
|
20
|
+
Poppins_600SemiBold,
|
|
21
|
+
Poppins_800ExtraBold,
|
|
22
|
+
Heebo_400Regular,
|
|
23
|
+
Heebo_600SemiBold
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=fonts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Poppins_400Regular","Poppins_600SemiBold","Poppins_800ExtraBold","Heebo_400Regular","Heebo_600SemiBold","fonts"],"sourceRoot":"../../../src","sources":["lib/fonts.ts"],"mappings":";;AAAA,SACEA,kBAAkB,EAClBC,mBAAmB,EACnBC,oBAAoB,QACf,4BAA4B;AACnC,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,0BAA0B;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,KAAK,GAAG;EACnBL,kBAAkB;EAClBC,mBAAmB;EACnBC,oBAAoB;EACpBC,gBAAgB;EAChBC;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { DarkTheme, DefaultTheme } from '@react-navigation/native';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Custom theme colors based on your Figma design tokens
|
|
7
|
+
* Using your categorized color system:
|
|
8
|
+
* 1. Surfaces - Page and card backgrounds
|
|
9
|
+
* 2. Text - All text colors with opacity variants
|
|
10
|
+
* 3. Primary - Main buttons and CTAs
|
|
11
|
+
* 4. Secondary - Secondary buttons
|
|
12
|
+
* 5. Tertiary/Accent - Highlights and selections
|
|
13
|
+
* 6. Borders - All borders and dividers
|
|
14
|
+
* 7. Highlights - Status/semantic colors
|
|
15
|
+
* 8. Brand - Brand accent colors (use sparingly)
|
|
16
|
+
*/
|
|
17
|
+
export const THEME = {
|
|
18
|
+
light: {
|
|
19
|
+
// === 1. SURFACES ===
|
|
20
|
+
background: 'hsl(210, 17%, 97%)',
|
|
21
|
+
// #F7F8FA
|
|
22
|
+
card: 'hsl(0, 0%, 100%)',
|
|
23
|
+
// #FFFFFF
|
|
24
|
+
popover: 'hsl(0, 0%, 100%)',
|
|
25
|
+
// #FFFFFF
|
|
26
|
+
muted: 'hsl(0, 0%, 100%)',
|
|
27
|
+
// #FFFFFF
|
|
28
|
+
|
|
29
|
+
// === 2. TEXT ===
|
|
30
|
+
foreground: 'hsl(0, 0%, 7%)',
|
|
31
|
+
// #121212
|
|
32
|
+
cardForeground: 'hsl(0, 0%, 7%)',
|
|
33
|
+
// #121212
|
|
34
|
+
popoverForeground: 'hsl(0, 0%, 7%)',
|
|
35
|
+
// #121212
|
|
36
|
+
mutedForeground: 'hsla(0, 0%, 7%, 0.7)',
|
|
37
|
+
// #121212 at 70%
|
|
38
|
+
|
|
39
|
+
// === 3. PRIMARY (Main buttons, CTAs) ===
|
|
40
|
+
primary: 'hsl(200, 13%, 11%)',
|
|
41
|
+
// #161A1D - Near black
|
|
42
|
+
primaryForeground: 'hsl(0, 0%, 100%)',
|
|
43
|
+
// #FFFFFF
|
|
44
|
+
|
|
45
|
+
// === 4. SECONDARY (Secondary buttons) ===
|
|
46
|
+
secondary: 'hsl(218, 14%, 53%)',
|
|
47
|
+
// #64748B
|
|
48
|
+
secondaryForeground: 'hsl(0, 0%, 100%)',
|
|
49
|
+
// #FFFFFF
|
|
50
|
+
|
|
51
|
+
// === 5. TERTIARY/ACCENT (Highlights, selections) ===
|
|
52
|
+
accent: 'hsl(356, 76%, 57%)',
|
|
53
|
+
// #E43341 - Crimson
|
|
54
|
+
accentForeground: 'hsl(0, 0%, 100%)',
|
|
55
|
+
// #FFFFFF
|
|
56
|
+
|
|
57
|
+
// === 6. BORDERS ===
|
|
58
|
+
border: 'hsl(214, 32%, 84%)',
|
|
59
|
+
// #CBD5E1
|
|
60
|
+
input: 'hsl(214, 32%, 84%)',
|
|
61
|
+
// #CBD5E1
|
|
62
|
+
ring: 'hsl(200, 13%, 11%)',
|
|
63
|
+
// #161A1D - Same as primary
|
|
64
|
+
|
|
65
|
+
// === 7. HIGHLIGHTS ===
|
|
66
|
+
destructive: 'hsl(356, 87%, 57%)',
|
|
67
|
+
// #F2353C - Red
|
|
68
|
+
destructiveForeground: 'hsl(0, 0%, 100%)',
|
|
69
|
+
success: 'hsl(88, 37%, 52%)',
|
|
70
|
+
// #88B053 - Green
|
|
71
|
+
info: 'hsl(189, 45%, 51%)',
|
|
72
|
+
// #4BAABE - Blue
|
|
73
|
+
warning: 'hsl(28, 81%, 57%)',
|
|
74
|
+
// #ED9035 - Orange
|
|
75
|
+
|
|
76
|
+
// === 8. BRAND COLORS (Custom - use manually) ===
|
|
77
|
+
brand1: 'hsl(252, 97%, 25%)',
|
|
78
|
+
// #1E027F - Deep violet
|
|
79
|
+
brand2: 'hsl(356, 76%, 57%)',
|
|
80
|
+
// #E43341 - Crimson
|
|
81
|
+
brand3: 'hsl(304, 69%, 33%)',
|
|
82
|
+
// #931C88 - Magenta
|
|
83
|
+
|
|
84
|
+
// === CHART COLORS ===
|
|
85
|
+
chart1: 'hsl(88, 37%, 52%)',
|
|
86
|
+
// #88B053 - Green
|
|
87
|
+
chart2: 'hsl(189, 45%, 51%)',
|
|
88
|
+
// #4BAABE - Blue
|
|
89
|
+
chart3: 'hsl(28, 81%, 57%)',
|
|
90
|
+
// #ED9035 - Orange
|
|
91
|
+
chart4: 'hsl(254, 46%, 42%)',
|
|
92
|
+
// #573DAB - Purple
|
|
93
|
+
chart5: 'hsl(348, 78%, 60%)',
|
|
94
|
+
// #EA4A6B - Pink
|
|
95
|
+
|
|
96
|
+
// === MISC ===
|
|
97
|
+
radius: '0.5rem'
|
|
98
|
+
},
|
|
99
|
+
dark: {
|
|
100
|
+
// === 1. SURFACES ===
|
|
101
|
+
background: 'hsl(200, 13%, 10%)',
|
|
102
|
+
// #161A1D
|
|
103
|
+
card: 'hsl(180, 14%, 13%)',
|
|
104
|
+
// #1D2727
|
|
105
|
+
popover: 'hsl(180, 14%, 13%)',
|
|
106
|
+
// #1D2727
|
|
107
|
+
muted: 'hsl(180, 14%, 13%)',
|
|
108
|
+
// #1D2727
|
|
109
|
+
|
|
110
|
+
// === 2. TEXT ===
|
|
111
|
+
foreground: 'hsl(0, 0%, 100%)',
|
|
112
|
+
// #FFFFFF
|
|
113
|
+
cardForeground: 'hsl(0, 0%, 100%)',
|
|
114
|
+
// #FFFFFF
|
|
115
|
+
popoverForeground: 'hsl(0, 0%, 100%)',
|
|
116
|
+
// #FFFFFF
|
|
117
|
+
mutedForeground: 'hsla(0, 0%, 100%, 0.7)',
|
|
118
|
+
// #FFFFFF at 70%
|
|
119
|
+
|
|
120
|
+
// === 3. PRIMARY (Main buttons, CTAs) ===
|
|
121
|
+
primary: 'hsl(210, 13%, 85%)',
|
|
122
|
+
// #D0D5D9 - Light grey (softer than white)
|
|
123
|
+
primaryForeground: 'hsl(200, 13%, 11%)',
|
|
124
|
+
// #161A1D - Dark text
|
|
125
|
+
|
|
126
|
+
// === 4. SECONDARY (Secondary buttons) ===
|
|
127
|
+
secondary: 'hsl(218, 14%, 53%)',
|
|
128
|
+
// #64748B
|
|
129
|
+
secondaryForeground: 'hsl(0, 0%, 100%)',
|
|
130
|
+
// #FFFFFF
|
|
131
|
+
|
|
132
|
+
// === 5. TERTIARY/ACCENT (Highlights, selections) ===
|
|
133
|
+
accent: 'hsl(356, 76%, 57%)',
|
|
134
|
+
// #E43341 - Crimson
|
|
135
|
+
accentForeground: 'hsl(0, 0%, 100%)',
|
|
136
|
+
// #FFFFFF
|
|
137
|
+
|
|
138
|
+
// === 6. BORDERS ===
|
|
139
|
+
border: 'hsl(215, 25%, 27%)',
|
|
140
|
+
// #334155 - Balanced slate-700
|
|
141
|
+
input: 'hsl(215, 25%, 27%)',
|
|
142
|
+
// #334155
|
|
143
|
+
ring: 'hsl(210, 13%, 85%)',
|
|
144
|
+
// #D0D5D9 - Same as primary
|
|
145
|
+
|
|
146
|
+
// === 7. HIGHLIGHTS ===
|
|
147
|
+
destructive: 'hsl(356, 87%, 57%)',
|
|
148
|
+
// #F2353C - Red
|
|
149
|
+
destructiveForeground: 'hsl(0, 0%, 100%)',
|
|
150
|
+
success: 'hsl(88, 37%, 52%)',
|
|
151
|
+
// #88B053 - Green
|
|
152
|
+
info: 'hsl(189, 45%, 51%)',
|
|
153
|
+
// #4BAABE - Blue
|
|
154
|
+
warning: 'hsl(28, 81%, 57%)',
|
|
155
|
+
// #ED9035 - Orange
|
|
156
|
+
|
|
157
|
+
// === 8. BRAND COLORS (Custom - use manually) ===
|
|
158
|
+
brand1: 'hsl(244, 100%, 73%)',
|
|
159
|
+
// #8075FF - Cool violet
|
|
160
|
+
brand2: 'hsl(356, 76%, 57%)',
|
|
161
|
+
// #E43341 - Crimson
|
|
162
|
+
brand3: 'hsl(291, 46%, 61%)',
|
|
163
|
+
// #C160D4 - Light magenta
|
|
164
|
+
|
|
165
|
+
// === CHART COLORS ===
|
|
166
|
+
chart1: 'hsl(88, 37%, 52%)',
|
|
167
|
+
// #88B053 - Green
|
|
168
|
+
chart2: 'hsl(189, 45%, 51%)',
|
|
169
|
+
// #4BAABE - Blue
|
|
170
|
+
chart3: 'hsl(28, 81%, 57%)',
|
|
171
|
+
// #ED9035 - Orange
|
|
172
|
+
chart4: 'hsl(254, 46%, 42%)',
|
|
173
|
+
// #573DAB - Purple
|
|
174
|
+
chart5: 'hsl(348, 78%, 60%)',
|
|
175
|
+
// #EA4A6B - Pink
|
|
176
|
+
|
|
177
|
+
// === MISC ===
|
|
178
|
+
radius: '0.5rem'
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* React Navigation theme configuration
|
|
184
|
+
* Maps our custom theme to React Navigation's theme structure
|
|
185
|
+
*/
|
|
186
|
+
export const NAV_THEME = {
|
|
187
|
+
light: {
|
|
188
|
+
...DefaultTheme,
|
|
189
|
+
colors: {
|
|
190
|
+
...DefaultTheme.colors,
|
|
191
|
+
background: THEME.light.background,
|
|
192
|
+
border: THEME.light.border,
|
|
193
|
+
card: THEME.light.card,
|
|
194
|
+
notification: THEME.light.destructive,
|
|
195
|
+
primary: THEME.light.primary,
|
|
196
|
+
text: THEME.light.foreground
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
dark: {
|
|
200
|
+
...DarkTheme,
|
|
201
|
+
colors: {
|
|
202
|
+
...DarkTheme.colors,
|
|
203
|
+
background: THEME.dark.background,
|
|
204
|
+
border: THEME.dark.border,
|
|
205
|
+
card: THEME.dark.card,
|
|
206
|
+
notification: THEME.dark.destructive,
|
|
207
|
+
primary: THEME.dark.primary,
|
|
208
|
+
text: THEME.dark.foreground
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DarkTheme","DefaultTheme","THEME","light","background","card","popover","muted","foreground","cardForeground","popoverForeground","mutedForeground","primary","primaryForeground","secondary","secondaryForeground","accent","accentForeground","border","input","ring","destructive","destructiveForeground","success","info","warning","brand1","brand2","brand3","chart1","chart2","chart3","chart4","chart5","radius","dark","NAV_THEME","colors","notification","text"],"sourceRoot":"../../../src","sources":["lib/theme.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,YAAY,QAAoB,0BAA0B;;AAE9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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