@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,227 @@
|
|
|
1
|
+
import type { LucideIcon } from 'lucide-react-native';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for an action item in the AppBar
|
|
5
|
+
*
|
|
6
|
+
* @property {LucideIcon} icon - Icon component from lucide-react-native
|
|
7
|
+
* @property {() => void} [onPress] - Callback when action is pressed
|
|
8
|
+
* @property {string} [label] - Accessibility label for the action
|
|
9
|
+
* @property {string} [className] - Additional classes for the action button container
|
|
10
|
+
* @property {string} [iconClassName] - Additional classes for the icon
|
|
11
|
+
* @property {boolean} [disabled] - Whether the action is disabled
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const actions: AppBarAction[] = [
|
|
16
|
+
* { icon: Search, onPress: handleSearch, label: 'Search' },
|
|
17
|
+
* { icon: MoreVertical, onPress: handleMore, label: 'More options' }
|
|
18
|
+
* ];
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export type AppBarAction = {
|
|
22
|
+
icon: LucideIcon;
|
|
23
|
+
onPress?: () => void;
|
|
24
|
+
label?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
iconClassName?: string;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Props for AppBar component - A flexible top app bar following Material Design guidelines
|
|
31
|
+
*
|
|
32
|
+
* @property {string | React.ReactNode} [title] - AppBar title text or custom component
|
|
33
|
+
* @property {string} [subtitle] - Optional subtitle text displayed below title
|
|
34
|
+
*
|
|
35
|
+
* @property {React.ReactNode} [leading] - Custom leading widget (can include multiple icons or custom components, overrides default back button)
|
|
36
|
+
* @property {boolean} [showLeading=true] - Whether to show the leading widget
|
|
37
|
+
* @property {() => void} [onLeadingPress] - Callback when leading icon is pressed (only used if no custom leading provided)
|
|
38
|
+
* @property {LucideIcon} [leadingIcon=ArrowLeft] - Icon for the leading button (only used if no custom leading provided)
|
|
39
|
+
*
|
|
40
|
+
* @property {React.ReactNode} [center] - Custom center component (overrides title/subtitle, can include images, text, or complex layouts)
|
|
41
|
+
*
|
|
42
|
+
* @property {AppBarAction[]} [actions=[]] - Array of action items to display on the right (supports multiple icons)
|
|
43
|
+
*
|
|
44
|
+
* @property {string} [className] - Additional classes for the root container
|
|
45
|
+
* @property {string} [titleClassName] - Additional classes for the title text
|
|
46
|
+
* @property {string} [subtitleClassName] - Additional classes for the subtitle text
|
|
47
|
+
* @property {string} [contentClassName] - Additional classes for the content container
|
|
48
|
+
* @property {string} [leadingClassName] - Additional classes for the leading section container
|
|
49
|
+
* @property {string} [centerClassName] - Additional classes for the center section container
|
|
50
|
+
* @property {string} [actionsClassName] - Additional classes for the actions section container
|
|
51
|
+
*
|
|
52
|
+
* @property {boolean} [centerTitle=false] - Whether to center the title
|
|
53
|
+
* @property {number} [elevation=4] - Elevation level for shadow (0 = no shadow)
|
|
54
|
+
* @property {boolean} [transparent=false] - Whether the AppBar background is transparent
|
|
55
|
+
*
|
|
56
|
+
* @property {boolean} [useSafeArea=true] - Whether to respect safe area insets
|
|
57
|
+
*
|
|
58
|
+
* @property {string} [backgroundColor] - Custom background color class
|
|
59
|
+
* @property {string} [foregroundColor] - Custom foreground/text color class
|
|
60
|
+
*
|
|
61
|
+
* @property {'default' | 'light-content' | 'dark-content'} [statusBarStyle] - Status bar text color (auto-adjusts based on theme if not set)
|
|
62
|
+
* @property {string} [statusBarColor] - Status bar background color (Android)
|
|
63
|
+
*
|
|
64
|
+
* @property {number} [height] - Custom height in pixels (default: 56px per Material Design)
|
|
65
|
+
*
|
|
66
|
+
* @property {React.ReactNode} [bottom] - Additional content below main app bar (e.g., tabs, search)
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* // Simple app bar with title
|
|
71
|
+
* <AppBar title="Home" />
|
|
72
|
+
*
|
|
73
|
+
* // With custom center containing image and text
|
|
74
|
+
* <AppBar
|
|
75
|
+
* center={
|
|
76
|
+
* <View className="flex-row items-center gap-2">
|
|
77
|
+
* <Image source={logo} className="w-8 h-8" />
|
|
78
|
+
* <Text className="text-lg font-bold">MyApp</Text>
|
|
79
|
+
* </View>
|
|
80
|
+
* }
|
|
81
|
+
* />
|
|
82
|
+
*
|
|
83
|
+
* // With multiple leading icons
|
|
84
|
+
* <AppBar
|
|
85
|
+
* title="Settings"
|
|
86
|
+
* leading={
|
|
87
|
+
* <View className="flex-row items-center">
|
|
88
|
+
* <IconButton icon={Menu} onPress={openMenu} />
|
|
89
|
+
* <IconButton icon={ArrowLeft} onPress={goBack} />
|
|
90
|
+
* </View>
|
|
91
|
+
* }
|
|
92
|
+
* actions={[
|
|
93
|
+
* { icon: Search, onPress: handleSearch },
|
|
94
|
+
* { icon: Settings, onPress: openSettings },
|
|
95
|
+
* { icon: MoreVertical, onPress: handleMore }
|
|
96
|
+
* ]}
|
|
97
|
+
* />
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export type AppBarProps = {
|
|
101
|
+
title?: string | React.ReactNode;
|
|
102
|
+
subtitle?: string;
|
|
103
|
+
leading?: React.ReactNode;
|
|
104
|
+
showLeading?: boolean;
|
|
105
|
+
onLeadingPress?: () => void;
|
|
106
|
+
leadingIcon?: LucideIcon;
|
|
107
|
+
center?: React.ReactNode;
|
|
108
|
+
actions?: AppBarAction[];
|
|
109
|
+
className?: string;
|
|
110
|
+
titleClassName?: string;
|
|
111
|
+
subtitleClassName?: string;
|
|
112
|
+
contentClassName?: string;
|
|
113
|
+
leadingClassName?: string;
|
|
114
|
+
centerClassName?: string;
|
|
115
|
+
actionsClassName?: string;
|
|
116
|
+
centerTitle?: boolean;
|
|
117
|
+
elevation?: number;
|
|
118
|
+
transparent?: boolean;
|
|
119
|
+
useSafeArea?: boolean;
|
|
120
|
+
backgroundColor?: string;
|
|
121
|
+
foregroundColor?: string;
|
|
122
|
+
statusBarStyle?: 'default' | 'light-content' | 'dark-content';
|
|
123
|
+
statusBarColor?: string;
|
|
124
|
+
height?: number;
|
|
125
|
+
bottom?: React.ReactNode;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* A flexible top app bar component following Material Design guidelines
|
|
129
|
+
*
|
|
130
|
+
* Provides consistent navigation and actions across your app with support for:
|
|
131
|
+
* - Customizable leading navigation (back button, menu, custom widget)
|
|
132
|
+
* - Title and subtitle with flexible positioning
|
|
133
|
+
* - Action buttons on the right side
|
|
134
|
+
* - Safe area insets handling
|
|
135
|
+
* - Platform-specific status bar configuration
|
|
136
|
+
* - Transparent overlay mode
|
|
137
|
+
* - Bottom content slot for tabs or search bars
|
|
138
|
+
*
|
|
139
|
+
* @component
|
|
140
|
+
* @example
|
|
141
|
+
* ```tsx
|
|
142
|
+
* // Basic with back button
|
|
143
|
+
* <AppBar
|
|
144
|
+
* title="Profile"
|
|
145
|
+
* onLeadingPress={() => navigation.goBack()}
|
|
146
|
+
* />
|
|
147
|
+
*
|
|
148
|
+
* // With menu and actions
|
|
149
|
+
* <AppBar
|
|
150
|
+
* title="Home"
|
|
151
|
+
* leadingIcon={Menu}
|
|
152
|
+
* onLeadingPress={openDrawer}
|
|
153
|
+
* actions={[
|
|
154
|
+
* { icon: Search, onPress: handleSearch },
|
|
155
|
+
* { icon: Settings, onPress: openSettings }
|
|
156
|
+
* ]}
|
|
157
|
+
* />
|
|
158
|
+
*
|
|
159
|
+
* // Transparent overlay (for use over content)
|
|
160
|
+
* <AppBar
|
|
161
|
+
* title="Photo"
|
|
162
|
+
* transparent
|
|
163
|
+
* foregroundColor="text-white"
|
|
164
|
+
* statusBarStyle="light-content"
|
|
165
|
+
* />
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* @accessibility
|
|
169
|
+
* - Leading button includes "Navigate back" accessibility label
|
|
170
|
+
* - Action buttons support custom accessibility labels
|
|
171
|
+
* - Proper button role for all interactive elements
|
|
172
|
+
*/
|
|
173
|
+
declare const AppBar: React.ForwardRefExoticComponent<AppBarProps & React.RefAttributes<(props: Omit<import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").ViewProps, keyof {
|
|
174
|
+
ref?: React.Ref<React.ComponentRef<typeof import("react-native/types_generated/Libraries/Components/View/ViewNativeComponent").default>>;
|
|
175
|
+
}> & {
|
|
176
|
+
ref?: React.Ref<React.ComponentRef<typeof import("react-native/types_generated/Libraries/Components/View/ViewNativeComponent").default>>;
|
|
177
|
+
}) => React.ReactNode>>;
|
|
178
|
+
/**
|
|
179
|
+
* Pre-configured AppBar variants for common use cases
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```tsx
|
|
183
|
+
* // Simple app bar without navigation
|
|
184
|
+
* <AppBarVariants.Simple title="Home" />
|
|
185
|
+
*
|
|
186
|
+
* // With back button
|
|
187
|
+
* <AppBarVariants.WithBack title="Details" onLeadingPress={goBack} />
|
|
188
|
+
*
|
|
189
|
+
* // With menu drawer
|
|
190
|
+
* <AppBarVariants.WithMenu title="Main" onLeadingPress={openDrawer} />
|
|
191
|
+
*
|
|
192
|
+
* // Transparent overlay
|
|
193
|
+
* <AppBarVariants.Transparent title="Gallery" />
|
|
194
|
+
*
|
|
195
|
+
* // Centered title
|
|
196
|
+
* <AppBarVariants.Centered title="About" />
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
export declare const AppBarVariants: {
|
|
200
|
+
Simple: (props: Omit<AppBarProps, "showLeading">) => import("react/jsx-runtime").JSX.Element;
|
|
201
|
+
WithBack: (props: AppBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
202
|
+
WithMenu: (props: Omit<AppBarProps, "leadingIcon">) => import("react/jsx-runtime").JSX.Element;
|
|
203
|
+
Transparent: (props: Omit<AppBarProps, "transparent">) => import("react/jsx-runtime").JSX.Element;
|
|
204
|
+
Centered: (props: Omit<AppBarProps, "centerTitle">) => import("react/jsx-runtime").JSX.Element;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Common icons exported for convenience when configuring AppBar
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* ```tsx
|
|
211
|
+
* import { AppBar, AppBarIcons } from './AppBar';
|
|
212
|
+
*
|
|
213
|
+
* <AppBar
|
|
214
|
+
* leadingIcon={AppBarIcons.Menu}
|
|
215
|
+
* actions={[
|
|
216
|
+
* { icon: AppBarIcons.MoreVertical, onPress: handleMore }
|
|
217
|
+
* ]}
|
|
218
|
+
* />
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
export declare const AppBarIcons: {
|
|
222
|
+
Menu: React.ForwardRefExoticComponent<import("lucide-react-native").LucideProps>;
|
|
223
|
+
ArrowLeft: React.ForwardRefExoticComponent<import("lucide-react-native").LucideProps>;
|
|
224
|
+
MoreVertical: React.ForwardRefExoticComponent<import("lucide-react-native").LucideProps>;
|
|
225
|
+
};
|
|
226
|
+
export { AppBar };
|
|
227
|
+
//# sourceMappingURL=AppBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/AppBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AACH,MAAM,MAAM,WAAW,GAAG;IAExB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,UAAU,CAAC;IAGzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAGzB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAGzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IAGtB,WAAW,CAAC,EAAE,OAAO,CAAC;IAGtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,cAAc,CAAC,EAAE,SAAS,GAAG,eAAe,GAAG,cAAc,CAAC;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,QAAA,MAAM,MAAM;OA7LiB,CAAC;;OACG,CAAC;uBAwcjC,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc;oBAET,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC;sBAK9B,WAAW;sBAGX,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC;yBAK7B,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC;sBAKnC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC;CAGnD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as AspectRatioPrimitive from '@rn-primitives/aspect-ratio';
|
|
2
|
+
/**
|
|
3
|
+
* Maintains a consistent aspect ratio for its child content
|
|
4
|
+
*
|
|
5
|
+
* Displays content within a desired ratio (e.g., 16/9, 4/3, 1/1) regardless of available space.
|
|
6
|
+
* Commonly used for images, videos, and embedded content that require specific proportions.
|
|
7
|
+
*
|
|
8
|
+
* @component
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* // 16:9 aspect ratio for video container
|
|
12
|
+
* <AspectRatio ratio={16 / 9} className="bg-muted">
|
|
13
|
+
* <Image source={{uri: 'video-thumbnail.jpg'}} className="h-full w-full rounded-md object-cover" />
|
|
14
|
+
* </AspectRatio>
|
|
15
|
+
*
|
|
16
|
+
* // Square aspect ratio for avatars
|
|
17
|
+
* <AspectRatio ratio={1} className="w-full">
|
|
18
|
+
* <Image source={{uri: 'avatar.jpg'}} className="h-full w-full" />
|
|
19
|
+
* </AspectRatio>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioPrimitive.RootProps>;
|
|
23
|
+
export { AspectRatio };
|
|
24
|
+
//# sourceMappingURL=Aspect-Ratio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Aspect-Ratio.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/Aspect-Ratio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,WAAW,2EAA4B,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,CAAC"}
|