@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,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Corner Radius System
|
|
3
|
+
*
|
|
4
|
+
* Automatically calculates the appropriate corner radius based on element dimensions.
|
|
5
|
+
*
|
|
6
|
+
* Design Rule:
|
|
7
|
+
* - Elements < 80px height → 12px radius
|
|
8
|
+
* - Elements ≥ 80px height → 20px radius
|
|
9
|
+
* - All corners use 100% smoothing (Apple-style squircles)
|
|
10
|
+
*
|
|
11
|
+
* Examples:
|
|
12
|
+
* - Button (50px height) → 12px
|
|
13
|
+
* - Chip (24px height) → 12px
|
|
14
|
+
* - Checkbox (16px height) → 4px (special case for very small)
|
|
15
|
+
* - Small card (60px height) → 12px
|
|
16
|
+
* - Large card (200px height) → 20px
|
|
17
|
+
* - Dialog (400px height) → 20px
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Primitive radius values from your design system
|
|
21
|
+
* Your exact values: 0, 2, 4, 8, 12, 20, 24, 32, 48
|
|
22
|
+
*/
|
|
23
|
+
export declare const RADIUS: {
|
|
24
|
+
readonly R0: 0;
|
|
25
|
+
readonly R1: 2;
|
|
26
|
+
readonly R2: 4;
|
|
27
|
+
readonly R3: 8;
|
|
28
|
+
readonly R4: 12;
|
|
29
|
+
readonly R5: 20;
|
|
30
|
+
readonly R6: 24;
|
|
31
|
+
readonly R7: 32;
|
|
32
|
+
readonly R8: 48;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Calculate corner radius based on element height
|
|
36
|
+
*
|
|
37
|
+
* @param height - Element height in pixels
|
|
38
|
+
* @returns Corner radius in pixels
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* // Button (50px height)
|
|
43
|
+
* const radius = getRadiusForHeight(50); // Returns 12
|
|
44
|
+
*
|
|
45
|
+
* // Checkbox (16px height)
|
|
46
|
+
* const radius = getRadiusForHeight(16); // Returns 4
|
|
47
|
+
*
|
|
48
|
+
* // Card (160px height)
|
|
49
|
+
* const radius = getRadiusForHeight(160); // Returns 20
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare function getRadiusForHeight(height: number): number;
|
|
53
|
+
/**
|
|
54
|
+
* Calculate corner radius based on smallest dimension (width or height)
|
|
55
|
+
* Useful for square or nearly-square elements
|
|
56
|
+
*
|
|
57
|
+
* @param width - Element width in pixels
|
|
58
|
+
* @param height - Element height in pixels
|
|
59
|
+
* @returns Corner radius in pixels
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```tsx
|
|
63
|
+
* // Square checkbox (16×16)
|
|
64
|
+
* const radius = getRadiusForDimensions(16, 16); // Returns 4
|
|
65
|
+
*
|
|
66
|
+
* // Wide button (200×50)
|
|
67
|
+
* const radius = getRadiusForDimensions(200, 50); // Returns 12 (based on height)
|
|
68
|
+
*
|
|
69
|
+
* // Tall card (300×200)
|
|
70
|
+
* const radius = getRadiusForDimensions(300, 200); // Returns 20 (based on width)
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare function getRadiusForDimensions(width: number, height: number): number;
|
|
74
|
+
/**
|
|
75
|
+
* Get corner radius with custom thresholds
|
|
76
|
+
* Advanced usage when you need different breakpoints
|
|
77
|
+
*
|
|
78
|
+
* @param height - Element height in pixels
|
|
79
|
+
* @param options - Custom threshold options
|
|
80
|
+
* @returns Corner radius in pixels
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* // Use 20px radius for elements ≥ 100px instead of 80px
|
|
85
|
+
* const radius = getCustomRadius(90, { largeThreshold: 100 });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare function getCustomRadius(height: number, options?: {
|
|
89
|
+
tinyThreshold?: number;
|
|
90
|
+
smallThreshold?: number;
|
|
91
|
+
tinyRadius?: number;
|
|
92
|
+
smallRadius?: number;
|
|
93
|
+
largeRadius?: number;
|
|
94
|
+
}): number;
|
|
95
|
+
/**
|
|
96
|
+
* Corner smoothing value (0-1)
|
|
97
|
+
* 1.0 = 100% smoothing (Apple-style squircles)
|
|
98
|
+
*/
|
|
99
|
+
export declare const CORNER_SMOOTHING = 1;
|
|
100
|
+
/**
|
|
101
|
+
* Preset radius values for common use cases
|
|
102
|
+
* Use these when you know the exact size you want
|
|
103
|
+
*/
|
|
104
|
+
export declare const RADIUS_PRESET: {
|
|
105
|
+
readonly none: 0;
|
|
106
|
+
readonly tiny: 4;
|
|
107
|
+
readonly small: 12;
|
|
108
|
+
readonly large: 20;
|
|
109
|
+
readonly pill: 24;
|
|
110
|
+
readonly circle: 9999;
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=cornerRadius.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cornerRadius.d.ts","sourceRoot":"","sources":["../../../../src/lib/cornerRadius.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;CAUT,CAAC;AAWX;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUzD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IACR,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GACA,MAAM,CAkBR;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,IAAM,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Font configuration for CampX Design System
|
|
3
|
+
*
|
|
4
|
+
* Fonts:
|
|
5
|
+
* - Poppins: Used for headings, buttons, labels, subtitles
|
|
6
|
+
* - Heebo: Used for body text, inputs, captions
|
|
7
|
+
*
|
|
8
|
+
* Weights:
|
|
9
|
+
* - 400 (Regular): Body text, labels, captions
|
|
10
|
+
* - 600 (Semi Bold): Subtitles, buttons, emphasized body
|
|
11
|
+
* - 800 (Extra Bold): Headings
|
|
12
|
+
*/
|
|
13
|
+
export declare const fonts: {
|
|
14
|
+
Poppins_400Regular: number;
|
|
15
|
+
Poppins_600SemiBold: number;
|
|
16
|
+
Poppins_800ExtraBold: number;
|
|
17
|
+
Heebo_400Regular: number;
|
|
18
|
+
Heebo_600SemiBold: number;
|
|
19
|
+
};
|
|
20
|
+
export type FontName = keyof typeof fonts;
|
|
21
|
+
//# sourceMappingURL=fonts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../../src/lib/fonts.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK;;;;;;CAMjB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Properly typed Slot component wrappers
|
|
3
|
+
*
|
|
4
|
+
* The @rn-primitives/slot package has complex type inference that doesn't
|
|
5
|
+
* properly expose className props. These wrappers provide correct typing.
|
|
6
|
+
*/
|
|
7
|
+
import type { PressableProps, ViewProps, TextProps, TextInputProps } from 'react-native';
|
|
8
|
+
export declare const SlotView: React.ForwardRefExoticComponent<ViewProps & {
|
|
9
|
+
className?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
cssInterop?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const SlotPressable: React.ForwardRefExoticComponent<PressableProps & {
|
|
14
|
+
className?: string;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
cssInterop?: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const SlotText: React.ForwardRefExoticComponent<TextProps & {
|
|
19
|
+
className?: string;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
cssInterop?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const SlotTextInput: React.ForwardRefExoticComponent<TextInputProps & {
|
|
24
|
+
className?: string;
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
cssInterop?: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const Slot: React.ForwardRefExoticComponent<ViewProps & {
|
|
29
|
+
className?: string;
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
}>;
|
|
32
|
+
//# sourceMappingURL=slot-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-helpers.d.ts","sourceRoot":"","sources":["../../../../src/lib/slot-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,SAAS,EACT,cAAc,EACf,MAAM,cAAc,CAAC;AAGtB,eAAO,MAAM,QAAQ,EAAyB,KAAK,CAAC,yBAAyB,CAC3E,SAAS,GAAG;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CACF,CAAC;AAEF,eAAO,MAAM,aAAa,EACG,KAAK,CAAC,yBAAyB,CACxD,cAAc,GAAG;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CACF,CAAC;AAEJ,eAAO,MAAM,QAAQ,EAAyB,KAAK,CAAC,yBAAyB,CAC3E,SAAS,GAAG;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CACF,CAAC;AAEF,eAAO,MAAM,aAAa,EACG,KAAK,CAAC,yBAAyB,CACxD,cAAc,GAAG;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CACF,CAAC;AAGJ,eAAO,MAAM,IAAI,EAAyB,KAAK,CAAC,yBAAyB,CACvE,SAAS,GAAG;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CACF,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type Theme } from '@react-navigation/native';
|
|
2
|
+
/**
|
|
3
|
+
* Custom theme colors based on your Figma design tokens
|
|
4
|
+
* Using your categorized color system:
|
|
5
|
+
* 1. Surfaces - Page and card backgrounds
|
|
6
|
+
* 2. Text - All text colors with opacity variants
|
|
7
|
+
* 3. Primary - Main buttons and CTAs
|
|
8
|
+
* 4. Secondary - Secondary buttons
|
|
9
|
+
* 5. Tertiary/Accent - Highlights and selections
|
|
10
|
+
* 6. Borders - All borders and dividers
|
|
11
|
+
* 7. Highlights - Status/semantic colors
|
|
12
|
+
* 8. Brand - Brand accent colors (use sparingly)
|
|
13
|
+
*/
|
|
14
|
+
export declare const THEME: {
|
|
15
|
+
light: {
|
|
16
|
+
background: string;
|
|
17
|
+
card: string;
|
|
18
|
+
popover: string;
|
|
19
|
+
muted: string;
|
|
20
|
+
foreground: string;
|
|
21
|
+
cardForeground: string;
|
|
22
|
+
popoverForeground: string;
|
|
23
|
+
mutedForeground: string;
|
|
24
|
+
primary: string;
|
|
25
|
+
primaryForeground: string;
|
|
26
|
+
secondary: string;
|
|
27
|
+
secondaryForeground: string;
|
|
28
|
+
accent: string;
|
|
29
|
+
accentForeground: string;
|
|
30
|
+
border: string;
|
|
31
|
+
input: string;
|
|
32
|
+
ring: string;
|
|
33
|
+
destructive: string;
|
|
34
|
+
destructiveForeground: string;
|
|
35
|
+
success: string;
|
|
36
|
+
info: string;
|
|
37
|
+
warning: string;
|
|
38
|
+
brand1: string;
|
|
39
|
+
brand2: string;
|
|
40
|
+
brand3: string;
|
|
41
|
+
chart1: string;
|
|
42
|
+
chart2: string;
|
|
43
|
+
chart3: string;
|
|
44
|
+
chart4: string;
|
|
45
|
+
chart5: string;
|
|
46
|
+
radius: string;
|
|
47
|
+
};
|
|
48
|
+
dark: {
|
|
49
|
+
background: string;
|
|
50
|
+
card: string;
|
|
51
|
+
popover: string;
|
|
52
|
+
muted: string;
|
|
53
|
+
foreground: string;
|
|
54
|
+
cardForeground: string;
|
|
55
|
+
popoverForeground: string;
|
|
56
|
+
mutedForeground: string;
|
|
57
|
+
primary: string;
|
|
58
|
+
primaryForeground: string;
|
|
59
|
+
secondary: string;
|
|
60
|
+
secondaryForeground: string;
|
|
61
|
+
accent: string;
|
|
62
|
+
accentForeground: string;
|
|
63
|
+
border: string;
|
|
64
|
+
input: string;
|
|
65
|
+
ring: string;
|
|
66
|
+
destructive: string;
|
|
67
|
+
destructiveForeground: string;
|
|
68
|
+
success: string;
|
|
69
|
+
info: string;
|
|
70
|
+
warning: string;
|
|
71
|
+
brand1: string;
|
|
72
|
+
brand2: string;
|
|
73
|
+
brand3: string;
|
|
74
|
+
chart1: string;
|
|
75
|
+
chart2: string;
|
|
76
|
+
chart3: string;
|
|
77
|
+
chart4: string;
|
|
78
|
+
chart5: string;
|
|
79
|
+
radius: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* React Navigation theme configuration
|
|
84
|
+
* Maps our custom theme to React Navigation's theme structure
|
|
85
|
+
*/
|
|
86
|
+
export declare const NAV_THEME: Record<'light' | 'dark', Theme>;
|
|
87
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/lib/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGjB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,KAAK,CAyBrD,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { type ClassValue } from 'clsx';
|
|
2
|
+
/**
|
|
3
|
+
* Utility function to merge Tailwind CSS classes with proper precedence
|
|
4
|
+
*
|
|
5
|
+
* Combines clsx (for conditional classes) and tailwind-merge (for deduplication)
|
|
6
|
+
* to create a single, optimized class string. Later classes override earlier ones.
|
|
7
|
+
*
|
|
8
|
+
* @param {...ClassValue[]} inputs - Class values to merge (strings, objects, arrays)
|
|
9
|
+
* @returns {string} Merged and deduplicated class string
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* // Basic usage
|
|
14
|
+
* cn('px-2 py-1', 'px-4') // => 'py-1 px-4'
|
|
15
|
+
*
|
|
16
|
+
* // With conditionals
|
|
17
|
+
* cn('text-base', isDark && 'text-white', 'font-bold')
|
|
18
|
+
* // => 'text-base text-white font-bold' (if isDark is true)
|
|
19
|
+
*
|
|
20
|
+
* // With objects
|
|
21
|
+
* cn({
|
|
22
|
+
* 'bg-primary': isPrimary,
|
|
23
|
+
* 'bg-secondary': !isPrimary
|
|
24
|
+
* })
|
|
25
|
+
*
|
|
26
|
+
* // Common component pattern
|
|
27
|
+
* cn('base-classes', variant === 'large' && 'large-classes', className)
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
31
|
+
/**
|
|
32
|
+
* Applies dark mode classes with optional runtime control
|
|
33
|
+
*
|
|
34
|
+
* Provides three modes of operation:
|
|
35
|
+
* 1. Static mode (darkMode undefined): Returns classes with `dark:` prefix for automatic switching
|
|
36
|
+
* 2. Dark mode (darkMode true): Strips `dark:` prefix and returns only dark classes
|
|
37
|
+
* 3. Light mode (darkMode false): Returns only base classes
|
|
38
|
+
*
|
|
39
|
+
* This function is useful when you need to programmatically control dark mode
|
|
40
|
+
* instead of relying on Tailwind's automatic dark mode detection.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} baseClasses - Classes to apply in light mode
|
|
43
|
+
* @param {string} darkClasses - Classes to apply in dark mode (with or without `dark:` prefix)
|
|
44
|
+
* @param {boolean} [darkMode] - Optional dark mode override (true/false/undefined)
|
|
45
|
+
* @returns {string} Merged class string based on mode
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* // Static mode - use Tailwind's automatic detection
|
|
50
|
+
* cnWithDark('bg-white', 'dark:bg-black')
|
|
51
|
+
* // => 'bg-white dark:bg-black'
|
|
52
|
+
*
|
|
53
|
+
* // Programmatic dark mode
|
|
54
|
+
* const { isDark } = useTheme();
|
|
55
|
+
* cnWithDark('bg-white', 'dark:bg-black', isDark)
|
|
56
|
+
* // => 'bg-black' (if isDark is true)
|
|
57
|
+
* // => 'bg-white' (if isDark is false)
|
|
58
|
+
*
|
|
59
|
+
* // With multiple classes
|
|
60
|
+
* cnWithDark(
|
|
61
|
+
* 'bg-white text-black border-gray-200',
|
|
62
|
+
* 'dark:bg-black dark:text-white dark:border-gray-800',
|
|
63
|
+
* isDark
|
|
64
|
+
* )
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @see {@link cn} for basic class merging
|
|
68
|
+
* @see {@link useTheme} for accessing theme state
|
|
69
|
+
*/
|
|
70
|
+
export declare function cnWithDark(baseClasses: string, darkClasses: string, darkMode?: boolean): string;
|
|
71
|
+
/**
|
|
72
|
+
* Get color value based on theme mode
|
|
73
|
+
*
|
|
74
|
+
* Simple utility to select between light and dark color values based on the
|
|
75
|
+
* current theme. Primarily used for native platforms where Tailwind CSS
|
|
76
|
+
* classes don't work with inline styles.
|
|
77
|
+
*
|
|
78
|
+
* @param {string} lightColor - Color value for light mode (CSS color, HSL, RGB, hex)
|
|
79
|
+
* @param {string} darkColor - Color value for dark mode (CSS color, HSL, RGB, hex)
|
|
80
|
+
* @param {boolean} [darkMode] - Whether dark mode is active (defaults to light if undefined)
|
|
81
|
+
* @returns {string} The appropriate color value for the current mode
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```tsx
|
|
85
|
+
* import { useTheme } from './ThemeProvider';
|
|
86
|
+
*
|
|
87
|
+
* function MyComponent() {
|
|
88
|
+
* const { isDark } = useTheme();
|
|
89
|
+
*
|
|
90
|
+
* // Get color for inline styles
|
|
91
|
+
* const textColor = getThemeColor('#000000', '#ffffff', isDark);
|
|
92
|
+
* const bgColor = getThemeColor('hsl(0, 0%, 100%)', 'hsl(0, 0%, 10%)', isDark);
|
|
93
|
+
*
|
|
94
|
+
* return (
|
|
95
|
+
* <View style={{ backgroundColor: bgColor }}>
|
|
96
|
+
* <NativeText style={{ color: textColor }}>
|
|
97
|
+
* Theme-aware text
|
|
98
|
+
* </NativeText>
|
|
99
|
+
* </View>
|
|
100
|
+
* );
|
|
101
|
+
* }
|
|
102
|
+
*
|
|
103
|
+
* // Without theme context (defaults to light)
|
|
104
|
+
* const color = getThemeColor('#000', '#fff'); // => '#000'
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* @see {@link useTheme} for accessing theme state
|
|
108
|
+
* @see {@link getThemeColorValue} from theme-config for more advanced usage
|
|
109
|
+
*/
|
|
110
|
+
export declare function getThemeColor(lightColor: string, darkColor: string, darkMode?: boolean): string;
|
|
111
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,UAAU,CACxB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,OAAO,GACjB,MAAM,CAiBR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,OAAO,GACjB,MAAM,CAKR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/react-native-blueprint",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "This is a react-native package for mobile apps",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"ios",
|
|
21
21
|
"cpp",
|
|
22
22
|
"*.podspec",
|
|
23
|
+
"nativewind-env.d.ts",
|
|
23
24
|
"react-native.config.js",
|
|
24
25
|
"!ios/build",
|
|
25
26
|
"!android/build",
|
|
@@ -39,7 +40,10 @@
|
|
|
39
40
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
40
41
|
"clean": "del-cli lib",
|
|
41
42
|
"prepare": "bob build",
|
|
42
|
-
"release": "release-it --only-version"
|
|
43
|
+
"release": "release-it --only-version",
|
|
44
|
+
"publish-package": "./scripts/publish.sh",
|
|
45
|
+
"android": "expo run:android",
|
|
46
|
+
"ios": "expo run:ios"
|
|
43
47
|
},
|
|
44
48
|
"keywords": [
|
|
45
49
|
"react-native",
|
|
@@ -146,6 +150,12 @@
|
|
|
146
150
|
{
|
|
147
151
|
"esm": true
|
|
148
152
|
}
|
|
153
|
+
],
|
|
154
|
+
[
|
|
155
|
+
"typescript",
|
|
156
|
+
{
|
|
157
|
+
"project": "tsconfig.json"
|
|
158
|
+
}
|
|
149
159
|
]
|
|
150
160
|
]
|
|
151
161
|
},
|
|
@@ -188,9 +198,12 @@
|
|
|
188
198
|
"class-variance-authority": "^0.7.1",
|
|
189
199
|
"clsx": "^2.1.1",
|
|
190
200
|
"expo": "^54.0.12",
|
|
201
|
+
"expo-dev-client": "~6.0.15",
|
|
191
202
|
"expo-font": "^14.0.9",
|
|
192
203
|
"figma-squircle": "^1.1.0",
|
|
193
204
|
"lucide-react-native": "^0.546.0",
|
|
205
|
+
"react": "19.1.0",
|
|
206
|
+
"react-native": "0.81.4",
|
|
194
207
|
"react-native-figma-squircle": "^0.4.0",
|
|
195
208
|
"react-native-floating-action": "^1.22.0",
|
|
196
209
|
"react-native-gesture-handler": "^2.28.0",
|
|
@@ -122,7 +122,9 @@ function AccordionItem({
|
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
const Trigger =
|
|
125
|
+
const Trigger = (
|
|
126
|
+
Platform.OS === 'web' ? View : Pressable
|
|
127
|
+
) as React.ComponentType<any>;
|
|
126
128
|
|
|
127
129
|
/**
|
|
128
130
|
* Clickable trigger button that toggles accordion item expansion
|
|
@@ -4,12 +4,14 @@ import { TextClassContext } from './Text';
|
|
|
4
4
|
import { cn } from '../../lib/utils';
|
|
5
5
|
import * as AlertDialogPrimitive from '@rn-primitives/alert-dialog';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { Platform, View, type ViewProps } from 'react-native';
|
|
7
|
+
import { Platform, View as RNView, type ViewProps } from 'react-native';
|
|
8
8
|
import { cssInterop } from 'nativewind';
|
|
9
9
|
import { FadeIn, FadeOut } from 'react-native-reanimated';
|
|
10
10
|
import { FullWindowOverlay as RNFullWindowOverlay } from 'react-native-screens';
|
|
11
11
|
|
|
12
|
-
cssInterop(
|
|
12
|
+
const View = cssInterop(RNView, { className: 'style' }) as React.ComponentType<
|
|
13
|
+
ViewProps & { className?: string; children?: React.ReactNode }
|
|
14
|
+
>;
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* Root alert dialog container
|
|
@@ -153,7 +155,7 @@ function AlertDialogContent({
|
|
|
153
155
|
}),
|
|
154
156
|
className
|
|
155
157
|
)}
|
|
156
|
-
{...props}
|
|
158
|
+
{...(props as any)}
|
|
157
159
|
/>
|
|
158
160
|
</AlertDialogOverlay>
|
|
159
161
|
</AlertDialogPortal>
|
|
@@ -3,10 +3,12 @@ import { Text, TextClassContext } from './Text';
|
|
|
3
3
|
import { cn } from '../../lib/utils';
|
|
4
4
|
import type { LucideIcon } from 'lucide-react-native';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { View, type ViewProps } from 'react-native';
|
|
6
|
+
import { View as RNView, type ViewProps } from 'react-native';
|
|
7
7
|
import { cssInterop } from 'nativewind';
|
|
8
8
|
|
|
9
|
-
cssInterop(
|
|
9
|
+
const View = cssInterop(RNView, { className: 'style' }) as React.ComponentType<
|
|
10
|
+
ViewProps & { className?: string; children?: React.ReactNode }
|
|
11
|
+
>;
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Alert component for displaying important messages or notifications
|
|
@@ -48,7 +50,8 @@ function Alert({
|
|
|
48
50
|
iconClassName,
|
|
49
51
|
...props
|
|
50
52
|
}: ViewProps &
|
|
51
|
-
React.RefAttributes<
|
|
53
|
+
React.RefAttributes<RNView> & {
|
|
54
|
+
children?: React.ReactNode;
|
|
52
55
|
icon: LucideIcon;
|
|
53
56
|
variant?: 'default' | 'destructive';
|
|
54
57
|
iconClassName?: string;
|
|
@@ -67,7 +70,7 @@ function Alert({
|
|
|
67
70
|
'bg-card dark:bg-card border-border dark:border-border relative w-full rounded-lg border px-4 pb-2 pt-3.5',
|
|
68
71
|
className
|
|
69
72
|
)}
|
|
70
|
-
{...props}
|
|
73
|
+
{...(props as any)}
|
|
71
74
|
>
|
|
72
75
|
<View className="absolute left-3.5 top-3">
|
|
73
76
|
<Icon
|
|
@@ -13,8 +13,12 @@ import { cn } from '../../lib/utils';
|
|
|
13
13
|
import { Icon } from './Icon';
|
|
14
14
|
import { Text } from './Text';
|
|
15
15
|
|
|
16
|
-
const View = cssInterop(RNView, {
|
|
17
|
-
|
|
16
|
+
const View = cssInterop(RNView, {
|
|
17
|
+
className: 'style',
|
|
18
|
+
}) as React.ComponentType<any>;
|
|
19
|
+
const Pressable = cssInterop(RNPressable, {
|
|
20
|
+
className: 'style',
|
|
21
|
+
}) as React.ComponentType<any>;
|
|
18
22
|
|
|
19
23
|
/**
|
|
20
24
|
* Configuration for an action item in the AppBar
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Image, View } from 'react-native';
|
|
2
|
+
import { Image as RNImage, View as RNView } from 'react-native';
|
|
3
3
|
import { cssInterop } from 'nativewind';
|
|
4
4
|
import { cn } from '../../lib/utils';
|
|
5
5
|
import type { ViewRef, SlottableViewProps } from '@rn-primitives/types';
|
|
6
6
|
import * as Slot from '@rn-primitives/slot';
|
|
7
7
|
|
|
8
|
-
cssInterop(
|
|
8
|
+
const View = cssInterop(RNView, {
|
|
9
|
+
className: 'style',
|
|
10
|
+
}) as React.ComponentType<any>;
|
|
9
11
|
cssInterop(Slot.View, { className: 'style' });
|
|
10
|
-
cssInterop(
|
|
12
|
+
const Image = cssInterop(RNImage, {
|
|
13
|
+
className: 'style',
|
|
14
|
+
}) as React.ComponentType<any>;
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* Avatar container component
|
|
@@ -57,8 +61,8 @@ Avatar.displayName = 'Avatar';
|
|
|
57
61
|
* @property {string} [className] - Additional Tailwind classes
|
|
58
62
|
*/
|
|
59
63
|
const AvatarImage = React.forwardRef<
|
|
60
|
-
React.ElementRef<typeof
|
|
61
|
-
React.ComponentPropsWithoutRef<typeof
|
|
64
|
+
React.ElementRef<typeof RNImage>,
|
|
65
|
+
React.ComponentPropsWithoutRef<typeof RNImage> & {
|
|
62
66
|
className?: string;
|
|
63
67
|
alt?: string;
|
|
64
68
|
}
|
|
@@ -66,7 +70,7 @@ const AvatarImage = React.forwardRef<
|
|
|
66
70
|
return (
|
|
67
71
|
<Image
|
|
68
72
|
className={cn('aspect-square h-full w-full', className)}
|
|
69
|
-
ref={ref}
|
|
73
|
+
ref={ref as any}
|
|
70
74
|
{...props}
|
|
71
75
|
/>
|
|
72
76
|
);
|
|
@@ -5,16 +5,24 @@ import React, {
|
|
|
5
5
|
useMemo,
|
|
6
6
|
useRef,
|
|
7
7
|
} from 'react';
|
|
8
|
-
import { StyleSheet, View, ViewStyle } from 'react-native';
|
|
8
|
+
import { StyleSheet, View as RNView, ViewStyle } from 'react-native';
|
|
9
9
|
import BottomSheetPrimitive, {
|
|
10
10
|
BottomSheetBackdrop,
|
|
11
11
|
BottomSheetBackdropProps,
|
|
12
|
-
BottomSheetView,
|
|
12
|
+
BottomSheetView as BSView,
|
|
13
13
|
} from '@gorhom/bottom-sheet';
|
|
14
|
+
import { cssInterop } from 'nativewind';
|
|
14
15
|
import { cn } from '../../lib/utils';
|
|
15
16
|
import { useTheme } from '../../lib/ThemeProvider';
|
|
16
17
|
import { hslToRgb } from '../theme-config';
|
|
17
18
|
|
|
19
|
+
const View = cssInterop(RNView, {
|
|
20
|
+
className: 'style',
|
|
21
|
+
}) as React.ComponentType<any>;
|
|
22
|
+
const BottomSheetView = cssInterop(BSView, {
|
|
23
|
+
className: 'style',
|
|
24
|
+
}) as React.ComponentType<any>;
|
|
25
|
+
|
|
18
26
|
type BottomSheetRef = {
|
|
19
27
|
open: () => void;
|
|
20
28
|
close: () => void;
|