@campxdev/react-native-blueprint 0.1.20 → 0.1.24
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/global.css +3 -3
- package/lib/global.css +1 -1
- package/lib/module/assets/icons/Image.png +0 -0
- package/lib/module/components/DataDisplay/Avatar/Avatar.js +1 -1
- package/lib/module/components/DataDisplay/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/DataDisplay/Banner/Banner.figma.js +17 -3
- package/lib/module/components/DataDisplay/Banner/Banner.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/Banner/Banner.js +138 -34
- package/lib/module/components/DataDisplay/Banner/Banner.js.map +1 -1
- package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js +2 -2
- package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js.map +1 -1
- package/lib/module/components/DataDisplay/Card/Card.figma.js +11 -4
- package/lib/module/components/DataDisplay/Card/Card.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/Card/Card.js +119 -65
- package/lib/module/components/DataDisplay/Card/Card.js.map +1 -1
- package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.figma.js +54 -0
- package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.figma.js.map +1 -0
- package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.js +318 -0
- package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.js.map +1 -0
- package/lib/module/components/DataDisplay/ChatBubble/index.js +4 -0
- package/lib/module/components/DataDisplay/ChatBubble/index.js.map +1 -0
- package/lib/module/components/DataDisplay/FeedCard/AttachmentDetails.js +69 -0
- package/lib/module/components/DataDisplay/FeedCard/AttachmentDetails.js.map +1 -0
- package/lib/module/components/DataDisplay/FeedCard/FeedCard.figma.js +19 -17
- package/lib/module/components/DataDisplay/FeedCard/FeedCard.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/FeedCard/FeedCard.js +30 -19
- package/lib/module/components/DataDisplay/FeedCard/FeedCard.js.map +1 -1
- package/lib/module/components/DataDisplay/Greeting/Greeting.figma.js +5 -5
- package/lib/module/components/DataDisplay/Greeting/Greeting.figma.js.map +1 -1
- package/lib/module/components/DataDisplay/Greeting/Greeting.js +46 -70
- package/lib/module/components/DataDisplay/Greeting/Greeting.js.map +1 -1
- package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.figma.js +16 -0
- package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.figma.js.map +1 -0
- package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.js +111 -0
- package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.js.map +1 -0
- package/lib/module/components/DataDisplay/ProfileCard/index.js +4 -0
- package/lib/module/components/DataDisplay/ProfileCard/index.js.map +1 -0
- package/lib/module/components/Input/Button/Button.js +11 -9
- package/lib/module/components/Input/Button/Button.js.map +1 -1
- package/lib/module/components/Navigation/Appbar/AppBar.figma.js +18 -6
- package/lib/module/components/Navigation/Appbar/AppBar.figma.js.map +1 -1
- package/lib/module/components/Navigation/Appbar/AppBar.js +36 -9
- package/lib/module/components/Navigation/Appbar/AppBar.js.map +1 -1
- package/lib/module/components/Navigation/Popover/Popover.js +1 -1
- package/lib/module/components/Navigation/Popover/Popover.js.map +1 -1
- package/lib/module/components/ui/index.js +2 -0
- package/lib/module/components/ui/index.js.map +1 -1
- package/lib/module/lib/theme.js +2 -2
- package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.figma.js +196 -0
- package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.js +255 -0
- package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/AccountPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/AccountPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.js +1 -1
- package/lib/module/patterns/pattern-components/CardListPattern/CardListPattern.js +2 -4
- package/lib/module/patterns/pattern-components/CardListPattern/CardListPattern.js.map +1 -1
- package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.figma.js +144 -0
- package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.js +213 -0
- package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/FeedPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/FeedPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.figma.js +70 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.js +260 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/HomeFacultyPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.figma.js +82 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.js +256 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/HomeParentPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.figma.js +73 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.figma.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.js +283 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.js.map +1 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/index.js +4 -0
- package/lib/module/patterns/pattern-components/HomeStudentPattern/index.js.map +1 -0
- package/lib/module/patterns/pattern-components/index.js +5 -0
- package/lib/module/patterns/pattern-components/index.js.map +1 -1
- package/package.json +27 -1
- package/src/assets/icons/Image.png +0 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +24 -21
- package/src/components/DataDisplay/Banner/Banner.figma.tsx +18 -3
- package/src/components/DataDisplay/Banner/Banner.tsx +153 -26
- package/src/components/DataDisplay/CalendarItem/CalendarItem.tsx +2 -2
- package/src/components/DataDisplay/Card/Card.figma.tsx +7 -3
- package/src/components/DataDisplay/Card/Card.tsx +152 -101
- package/src/components/DataDisplay/ChatBubble/ChatBubble.figma.tsx +54 -0
- package/src/components/DataDisplay/ChatBubble/ChatBubble.tsx +404 -0
- package/src/components/DataDisplay/ChatBubble/index.ts +8 -0
- package/src/components/DataDisplay/FeedCard/AttachmentDetails.tsx +96 -0
- package/src/components/DataDisplay/FeedCard/FeedCard.figma.tsx +17 -15
- package/src/components/DataDisplay/FeedCard/FeedCard.tsx +66 -35
- package/src/components/DataDisplay/Greeting/Greeting.figma.tsx +5 -5
- package/src/components/DataDisplay/Greeting/Greeting.tsx +58 -96
- package/src/components/DataDisplay/ProfileCard/ProfileCard.figma.tsx +17 -0
- package/src/components/DataDisplay/ProfileCard/ProfileCard.tsx +173 -0
- package/src/components/DataDisplay/ProfileCard/index.ts +1 -0
- package/src/components/Input/Button/Button.tsx +18 -10
- package/src/components/Navigation/Appbar/AppBar.figma.tsx +18 -6
- package/src/components/Navigation/Appbar/AppBar.tsx +58 -13
- package/src/components/Navigation/Popover/Popover.tsx +3 -3
- package/src/components/ui/index.ts +2 -0
- package/src/lib/theme.ts +2 -2
- package/src/patterns/pattern-components/AccountPattern/AccountPattern.figma.tsx +193 -0
- package/src/patterns/pattern-components/AccountPattern/AccountPattern.tsx +301 -0
- package/src/patterns/pattern-components/AccountPattern/index.ts +1 -0
- package/src/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.tsx +1 -1
- package/src/patterns/pattern-components/CardListPattern/CardListPattern.tsx +4 -9
- package/src/patterns/pattern-components/FeedPattern/FeedPattern.figma.tsx +146 -0
- package/src/patterns/pattern-components/FeedPattern/FeedPattern.tsx +264 -0
- package/src/patterns/pattern-components/FeedPattern/index.ts +2 -0
- package/src/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.figma.tsx +66 -0
- package/src/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.tsx +326 -0
- package/src/patterns/pattern-components/HomeFacultyPattern/index.ts +2 -0
- package/src/patterns/pattern-components/HomeParentPattern/HomeParentPattern.figma.tsx +75 -0
- package/src/patterns/pattern-components/HomeParentPattern/HomeParentPattern.tsx +328 -0
- package/src/patterns/pattern-components/HomeParentPattern/index.ts +2 -0
- package/src/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.figma.tsx +66 -0
- package/src/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.tsx +355 -0
- package/src/patterns/pattern-components/HomeStudentPattern/index.ts +2 -0
- package/src/patterns/pattern-components/index.ts +5 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { cssInterop } from 'nativewind';
|
|
4
2
|
import * as React from 'react';
|
|
5
3
|
import {
|
|
6
4
|
Pressable,
|
|
7
|
-
Text as RNText,
|
|
8
5
|
View,
|
|
6
|
+
Text as RNText,
|
|
9
7
|
type GestureResponderEvent,
|
|
10
|
-
type PressableProps,
|
|
11
8
|
type StyleProp,
|
|
12
9
|
type ViewStyle,
|
|
10
|
+
type PressableProps,
|
|
13
11
|
} from 'react-native';
|
|
12
|
+
import { cssInterop } from 'nativewind';
|
|
14
13
|
import { SquircleView } from 'react-native-figma-squircle';
|
|
14
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
15
15
|
|
|
16
|
-
import { useThemeColors } from '../../../lib/theme';
|
|
17
16
|
import { cn } from '../../../lib/utils';
|
|
17
|
+
import { useThemeColors } from '../../../lib/theme';
|
|
18
18
|
|
|
19
19
|
// NativeWind interop (className -> style)
|
|
20
20
|
cssInterop(Pressable, { className: 'style' });
|
|
@@ -48,13 +48,13 @@ function useVariantSquircleParams(variant: string) {
|
|
|
48
48
|
{ fillColor: string; strokeColor: string; strokeWidth: number }
|
|
49
49
|
> = {
|
|
50
50
|
default: {
|
|
51
|
-
fillColor: colors.
|
|
51
|
+
fillColor: colors.brandPrimary,
|
|
52
52
|
strokeColor: 'transparent',
|
|
53
53
|
strokeWidth: 0,
|
|
54
54
|
},
|
|
55
55
|
secondary: {
|
|
56
56
|
fillColor: colors.brandSecondary,
|
|
57
|
-
strokeColor: colors.
|
|
57
|
+
strokeColor: colors.border,
|
|
58
58
|
strokeWidth: 1,
|
|
59
59
|
},
|
|
60
60
|
outline: {
|
|
@@ -99,7 +99,7 @@ const buttonVariants = cva('flex-row items-center justify-center', {
|
|
|
99
99
|
// ✅ Figma-like sizing
|
|
100
100
|
default: 'py-3 px-5',
|
|
101
101
|
lg: 'py-5 px-6',
|
|
102
|
-
icon: 'h-10 w-10',
|
|
102
|
+
icon: 'h-10 w-10 p-3 justify-center items-center',
|
|
103
103
|
},
|
|
104
104
|
disabled: {
|
|
105
105
|
false: '',
|
|
@@ -178,6 +178,8 @@ export type ButtonProps = PressablePropsWithoutClassName &
|
|
|
178
178
|
|
|
179
179
|
showLeftIcon?: boolean;
|
|
180
180
|
showRightIcon?: boolean;
|
|
181
|
+
leftIcon?: React.ReactNode;
|
|
182
|
+
rightIcon?: React.ReactNode;
|
|
181
183
|
|
|
182
184
|
style?: StyleProp<ViewStyle>;
|
|
183
185
|
testID?: string;
|
|
@@ -211,6 +213,8 @@ export function Button(props: ButtonProps) {
|
|
|
211
213
|
disabled,
|
|
212
214
|
showLeftIcon,
|
|
213
215
|
showRightIcon,
|
|
216
|
+
leftIcon,
|
|
217
|
+
rightIcon,
|
|
214
218
|
style,
|
|
215
219
|
testID,
|
|
216
220
|
children,
|
|
@@ -263,7 +267,9 @@ export function Button(props: ButtonProps) {
|
|
|
263
267
|
)}
|
|
264
268
|
{...rest}
|
|
265
269
|
>
|
|
266
|
-
{showLeftIcon
|
|
270
|
+
{showLeftIcon
|
|
271
|
+
? leftIcon || <DummyIcon testID="button-left-icon" />
|
|
272
|
+
: null}
|
|
267
273
|
|
|
268
274
|
{!isIconOnly ? (
|
|
269
275
|
<RNText
|
|
@@ -278,7 +284,9 @@ export function Button(props: ButtonProps) {
|
|
|
278
284
|
</RNText>
|
|
279
285
|
) : null}
|
|
280
286
|
|
|
281
|
-
{showRightIcon
|
|
287
|
+
{showRightIcon
|
|
288
|
+
? rightIcon || <DummyIcon testID="button-right-icon" />
|
|
289
|
+
: null}
|
|
282
290
|
</Pressable>
|
|
283
291
|
</SquircleView>
|
|
284
292
|
</View>
|
|
@@ -21,9 +21,11 @@ const FIGMA_URL =
|
|
|
21
21
|
*/
|
|
22
22
|
figma.connect(AppBar, FIGMA_URL, {
|
|
23
23
|
props: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
type: figma.enum('type', {
|
|
25
|
+
'context': 'context',
|
|
26
|
+
'brand': 'brand',
|
|
27
|
+
'brand+switcher': 'brand+switcher',
|
|
28
|
+
'context+switcher': 'context+switcher',
|
|
27
29
|
}),
|
|
28
30
|
showLeading: figma.boolean('Show Leading'),
|
|
29
31
|
showTrailing: figma.boolean('Show Trailing'),
|
|
@@ -37,11 +39,20 @@ figma.connect(AppBar, FIGMA_URL, {
|
|
|
37
39
|
search: 'search',
|
|
38
40
|
}),
|
|
39
41
|
}),
|
|
40
|
-
logo: figma.
|
|
42
|
+
logo: figma.nestedProps('Logo', {
|
|
43
|
+
mode: figma.enum('mode', {
|
|
44
|
+
light: 'light',
|
|
45
|
+
dark: 'dark',
|
|
46
|
+
}),
|
|
47
|
+
brand: figma.enum('brand', {
|
|
48
|
+
campx: 'campx',
|
|
49
|
+
winnify: 'winnify',
|
|
50
|
+
}),
|
|
51
|
+
}),
|
|
41
52
|
},
|
|
42
53
|
example: (props) => (
|
|
43
54
|
<AppBar
|
|
44
|
-
|
|
55
|
+
type={props.type}
|
|
45
56
|
title={props.title}
|
|
46
57
|
subtitle={props.subtitle}
|
|
47
58
|
showLeading={props.showLeading}
|
|
@@ -49,9 +60,10 @@ figma.connect(AppBar, FIGMA_URL, {
|
|
|
49
60
|
showSubtitle={props.showSubtitle}
|
|
50
61
|
showHeaderBlock={props.showHeaderBlock}
|
|
51
62
|
headerType={props.headerType.type}
|
|
63
|
+
logoMode={props.logo.mode}
|
|
64
|
+
logoBrand={props.logo.brand}
|
|
52
65
|
onLeadingPress={() => {}}
|
|
53
66
|
onTrailingPress={() => {}}
|
|
54
67
|
/>
|
|
55
68
|
),
|
|
56
69
|
});
|
|
57
|
-
i;
|
|
@@ -30,10 +30,16 @@ const Pressable = RNPressable as any;
|
|
|
30
30
|
* --------------------------------------------------- */
|
|
31
31
|
|
|
32
32
|
export type AppBarVariant = 'default' | 'home';
|
|
33
|
+
export type AppBarType =
|
|
34
|
+
| 'context'
|
|
35
|
+
| 'brand'
|
|
36
|
+
| 'brand+switcher'
|
|
37
|
+
| 'context+switcher';
|
|
33
38
|
export type HeaderBlockType = 'tabs' | 'search';
|
|
34
39
|
|
|
35
40
|
export interface AppBarProps {
|
|
36
41
|
variant?: AppBarVariant;
|
|
42
|
+
type?: AppBarType;
|
|
37
43
|
|
|
38
44
|
title?: string;
|
|
39
45
|
subtitle?: string;
|
|
@@ -51,9 +57,13 @@ export interface AppBarProps {
|
|
|
51
57
|
leadingIcon?: React.ReactNode;
|
|
52
58
|
trailingIcon?: React.ReactNode;
|
|
53
59
|
|
|
54
|
-
/** For home variant logo */
|
|
60
|
+
/** For home variant logo or brand type */
|
|
55
61
|
logoSource?: ImageSourcePropType;
|
|
56
62
|
|
|
63
|
+
/** Avatar for switcher types (brand+switcher, context+switcher) */
|
|
64
|
+
switcherAvatar?: React.ReactNode;
|
|
65
|
+
onSwitcherPress?: () => void;
|
|
66
|
+
|
|
57
67
|
/** Whether to wrap with SafeAreaView for status bar */
|
|
58
68
|
useSafeArea?: boolean;
|
|
59
69
|
|
|
@@ -90,6 +100,7 @@ function HeaderBlock({ type }: { type: 'tabs' | 'search' }) {
|
|
|
90
100
|
export function AppBar(props: AppBarProps) {
|
|
91
101
|
const {
|
|
92
102
|
variant = 'default',
|
|
103
|
+
type = 'context',
|
|
93
104
|
title = 'Page Title',
|
|
94
105
|
subtitle = 'This is the page Subtitle',
|
|
95
106
|
|
|
@@ -107,6 +118,8 @@ export function AppBar(props: AppBarProps) {
|
|
|
107
118
|
trailingIcon,
|
|
108
119
|
|
|
109
120
|
logoSource,
|
|
121
|
+
switcherAvatar,
|
|
122
|
+
onSwitcherPress,
|
|
110
123
|
|
|
111
124
|
useSafeArea = true,
|
|
112
125
|
|
|
@@ -116,6 +129,8 @@ export function AppBar(props: AppBarProps) {
|
|
|
116
129
|
const { colorScheme } = useColorScheme();
|
|
117
130
|
const isDark = colorScheme === 'dark';
|
|
118
131
|
const isHome = variant === 'home';
|
|
132
|
+
const isBrandType = type === 'brand' || type === 'brand+switcher';
|
|
133
|
+
const hasSwitcher = type === 'brand+switcher' || type === 'context+switcher';
|
|
119
134
|
|
|
120
135
|
const content = (
|
|
121
136
|
<View
|
|
@@ -139,7 +154,22 @@ export function AppBar(props: AppBarProps) {
|
|
|
139
154
|
</Pressable>
|
|
140
155
|
)}
|
|
141
156
|
|
|
142
|
-
{
|
|
157
|
+
{/* Logo for brand+switcher (on left side) */}
|
|
158
|
+
{type === 'brand+switcher' && (
|
|
159
|
+
<View testID="appbar-logo-left">
|
|
160
|
+
{logoSource ? (
|
|
161
|
+
<Image
|
|
162
|
+
source={logoSource}
|
|
163
|
+
resizeMode="contain"
|
|
164
|
+
className="w-8 h-8"
|
|
165
|
+
/>
|
|
166
|
+
) : (
|
|
167
|
+
<View className="w-8 h-8 bg-surface-subtle rounded-lg" />
|
|
168
|
+
)}
|
|
169
|
+
</View>
|
|
170
|
+
)}
|
|
171
|
+
|
|
172
|
+
{!isBrandType && (
|
|
143
173
|
<View className="gap-1">
|
|
144
174
|
<Text
|
|
145
175
|
testID="appbar-title"
|
|
@@ -160,8 +190,8 @@ export function AppBar(props: AppBarProps) {
|
|
|
160
190
|
)}
|
|
161
191
|
</View>
|
|
162
192
|
|
|
163
|
-
{/* CENTER (Home logo) */}
|
|
164
|
-
{isHome && (
|
|
193
|
+
{/* CENTER (Home logo or Brand logo - only for 'brand' type) */}
|
|
194
|
+
{(isHome || type === 'brand') && (
|
|
165
195
|
<View
|
|
166
196
|
testID="appbar-logo"
|
|
167
197
|
className="flex-1 items-center justify-center"
|
|
@@ -179,15 +209,30 @@ export function AppBar(props: AppBarProps) {
|
|
|
179
209
|
)}
|
|
180
210
|
|
|
181
211
|
{/* RIGHT */}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
212
|
+
<View className="flex-row items-center gap-3">
|
|
213
|
+
{showTrailing && (
|
|
214
|
+
<Pressable
|
|
215
|
+
testID="appbar-trailing"
|
|
216
|
+
onPress={onTrailingPress}
|
|
217
|
+
accessibilityRole="button"
|
|
218
|
+
>
|
|
219
|
+
{trailingIcon ?? <View className="w-4 h-4" />}
|
|
220
|
+
</Pressable>
|
|
221
|
+
)}
|
|
222
|
+
{hasSwitcher && (
|
|
223
|
+
<Pressable
|
|
224
|
+
testID="appbar-switcher"
|
|
225
|
+
onPress={onSwitcherPress}
|
|
226
|
+
className="flex-row items-center gap-2 px-2 py-1 rounded-full border border-border-default"
|
|
227
|
+
accessibilityRole="button"
|
|
228
|
+
>
|
|
229
|
+
{switcherAvatar ?? (
|
|
230
|
+
<View className="w-8 h-8 bg-surface-subtle rounded-full" />
|
|
231
|
+
)}
|
|
232
|
+
<View className="w-4 h-4" />
|
|
233
|
+
</Pressable>
|
|
234
|
+
)}
|
|
235
|
+
</View>
|
|
191
236
|
</View>
|
|
192
237
|
|
|
193
238
|
{/* HEADER BLOCK */}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { View, Text, type StyleProp, type ViewStyle } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { Button } from '../../Input/Button/Button';
|
|
6
6
|
import {
|
|
7
|
-
PopoverContainer,
|
|
8
|
-
PopoverContent,
|
|
9
7
|
Popover as PopoverPrimitive,
|
|
10
8
|
PopoverTrigger,
|
|
9
|
+
PopoverContent,
|
|
10
|
+
PopoverContainer,
|
|
11
11
|
} from '../../Layout/PopoverContainer/Popover-Container';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -30,6 +30,7 @@ export * from '../DataDisplay/Banner/Banner';
|
|
|
30
30
|
export * from '../DataDisplay/BannerRow/BannerRow';
|
|
31
31
|
export * from '../DataDisplay/CalendarItem/CalendarItem';
|
|
32
32
|
export * from '../DataDisplay/Card/Card';
|
|
33
|
+
export * from '../DataDisplay/ChatBubble/ChatBubble';
|
|
33
34
|
export * from '../DataDisplay/Chips/Chips';
|
|
34
35
|
export * from '../DataDisplay/ChipsRow/ChipsRow';
|
|
35
36
|
export * from '../DataDisplay/DataCard/DataCard';
|
|
@@ -37,6 +38,7 @@ export * from '../DataDisplay/Datalist/Datalist';
|
|
|
37
38
|
export * from '../DataDisplay/DataListItem/DataListItem';
|
|
38
39
|
export * from '../DataDisplay/FeedCard/FeedCard';
|
|
39
40
|
export * from '../DataDisplay/Greeting/Greeting';
|
|
41
|
+
export * from '../DataDisplay/ProfileCard/ProfileCard';
|
|
40
42
|
export * from '../DataDisplay/MonthCalendar/MonthCalendar';
|
|
41
43
|
export * from '../DataDisplay/Separator/Separator';
|
|
42
44
|
export * from '../DataDisplay/Skeleton/Skeleton';
|
package/src/lib/theme.ts
CHANGED
|
@@ -46,8 +46,8 @@ export const THEME = {
|
|
|
46
46
|
accentForeground: 'hsl(0, 0%, 100%)', // #FFFFFF
|
|
47
47
|
|
|
48
48
|
// === 6. BORDERS ===
|
|
49
|
-
border: 'hsl(
|
|
50
|
-
input: 'hsl(
|
|
49
|
+
border: 'hsl(210, 13%, 80%)', // #CBD5E1
|
|
50
|
+
input: 'hsl(210, 13%, 80%)', // #CBD5E1
|
|
51
51
|
ring: 'hsl(200, 13%, 11%)', // #161A1D - Same as primary
|
|
52
52
|
|
|
53
53
|
// === 7. HIGHLIGHTS ===
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { AccountPattern } from './AccountPattern';
|
|
3
|
+
|
|
4
|
+
const FIGMA_URL =
|
|
5
|
+
'https://www.figma.com/design/YTb27Onq7Zk8OV16fHptxJ/Campx-App?node-id=417-194764';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* AccountPattern - Account/Profile screen layout pattern
|
|
9
|
+
*
|
|
10
|
+
* Use cases:
|
|
11
|
+
* - User account and profile management screens
|
|
12
|
+
* - Settings and preferences pages
|
|
13
|
+
* - Account information dashboards
|
|
14
|
+
* - Categorized account options (Academics, Finance, Utilities)
|
|
15
|
+
*
|
|
16
|
+
* Features:
|
|
17
|
+
* - User profile card at the top with name and ID
|
|
18
|
+
* - Multiple grouped sections with data list items
|
|
19
|
+
* - Support for custom sections (Academics, Finance, Utilities, etc.)
|
|
20
|
+
* - Full customization of section items and properties
|
|
21
|
+
* - Scrollable layout for long content
|
|
22
|
+
* - All sections independently configurable
|
|
23
|
+
*
|
|
24
|
+
* Customization:
|
|
25
|
+
* - Show/hide profile card
|
|
26
|
+
* - Customize user profile information
|
|
27
|
+
* - Add, remove, or customize sections
|
|
28
|
+
* - Configure each item's visibility toggles and actions
|
|
29
|
+
* - Set up callbacks for profile and item interactions
|
|
30
|
+
* - Adapt content based on user role or backend data
|
|
31
|
+
*/
|
|
32
|
+
figma.connect(AccountPattern, FIGMA_URL, {
|
|
33
|
+
example: () => (
|
|
34
|
+
<AccountPattern
|
|
35
|
+
showProfileCard={true}
|
|
36
|
+
userName="Marshall Mathers"
|
|
37
|
+
userID="3472732323"
|
|
38
|
+
avatarInitials="MM"
|
|
39
|
+
avatarType="image"
|
|
40
|
+
sections={[
|
|
41
|
+
{
|
|
42
|
+
id: 'academics',
|
|
43
|
+
title: 'Academics',
|
|
44
|
+
items: [
|
|
45
|
+
{
|
|
46
|
+
id: '1',
|
|
47
|
+
title: 'Data List Row Title',
|
|
48
|
+
subtitle: 'Data List Row Subtitle',
|
|
49
|
+
meta: 'Meta Content',
|
|
50
|
+
density: 'comfortable',
|
|
51
|
+
state: 'default',
|
|
52
|
+
showSubtitle: true,
|
|
53
|
+
showLeading: true,
|
|
54
|
+
showTrailing: true,
|
|
55
|
+
showDivider: true,
|
|
56
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: '2',
|
|
60
|
+
title: 'Data List Row Title',
|
|
61
|
+
subtitle: 'Data List Row Subtitle',
|
|
62
|
+
meta: 'Meta Content',
|
|
63
|
+
density: 'comfortable',
|
|
64
|
+
state: 'default',
|
|
65
|
+
showSubtitle: true,
|
|
66
|
+
showLeading: true,
|
|
67
|
+
showTrailing: true,
|
|
68
|
+
showDivider: true,
|
|
69
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: '3',
|
|
73
|
+
title: 'Data List Row Title',
|
|
74
|
+
subtitle: 'Data List Row Subtitle',
|
|
75
|
+
meta: 'Meta Content',
|
|
76
|
+
density: 'comfortable',
|
|
77
|
+
state: 'default',
|
|
78
|
+
showSubtitle: true,
|
|
79
|
+
showLeading: true,
|
|
80
|
+
showTrailing: true,
|
|
81
|
+
showDivider: true,
|
|
82
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: '4',
|
|
86
|
+
title: 'Data List Row Title',
|
|
87
|
+
subtitle: 'Data List Row Subtitle',
|
|
88
|
+
meta: 'Meta Content',
|
|
89
|
+
density: 'comfortable',
|
|
90
|
+
state: 'default',
|
|
91
|
+
showSubtitle: true,
|
|
92
|
+
showLeading: true,
|
|
93
|
+
showTrailing: true,
|
|
94
|
+
showDivider: true,
|
|
95
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'finance',
|
|
101
|
+
title: 'Finance',
|
|
102
|
+
items: [
|
|
103
|
+
{
|
|
104
|
+
id: '5',
|
|
105
|
+
title: 'Data List Row Title',
|
|
106
|
+
subtitle: 'Data List Row Subtitle',
|
|
107
|
+
meta: 'Meta Content',
|
|
108
|
+
density: 'comfortable',
|
|
109
|
+
state: 'default',
|
|
110
|
+
showSubtitle: true,
|
|
111
|
+
showLeading: true,
|
|
112
|
+
showTrailing: true,
|
|
113
|
+
showDivider: true,
|
|
114
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: '6',
|
|
118
|
+
title: 'Data List Row Title',
|
|
119
|
+
subtitle: 'Data List Row Subtitle',
|
|
120
|
+
meta: 'Meta Content',
|
|
121
|
+
density: 'comfortable',
|
|
122
|
+
state: 'default',
|
|
123
|
+
showSubtitle: true,
|
|
124
|
+
showLeading: true,
|
|
125
|
+
showTrailing: true,
|
|
126
|
+
showDivider: true,
|
|
127
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: '7',
|
|
131
|
+
title: 'Data List Row Title',
|
|
132
|
+
subtitle: 'Data List Row Subtitle',
|
|
133
|
+
meta: 'Meta Content',
|
|
134
|
+
density: 'comfortable',
|
|
135
|
+
state: 'default',
|
|
136
|
+
showSubtitle: true,
|
|
137
|
+
showLeading: true,
|
|
138
|
+
showTrailing: true,
|
|
139
|
+
showDivider: true,
|
|
140
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: 'utilities',
|
|
146
|
+
title: 'Utilities',
|
|
147
|
+
items: [
|
|
148
|
+
{
|
|
149
|
+
id: '8',
|
|
150
|
+
title: 'Data List Row Title',
|
|
151
|
+
subtitle: 'Data List Row Subtitle',
|
|
152
|
+
meta: 'Meta Content',
|
|
153
|
+
density: 'comfortable',
|
|
154
|
+
state: 'default',
|
|
155
|
+
showSubtitle: true,
|
|
156
|
+
showLeading: true,
|
|
157
|
+
showTrailing: true,
|
|
158
|
+
showDivider: true,
|
|
159
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: '9',
|
|
163
|
+
title: 'Data List Row Title',
|
|
164
|
+
subtitle: 'Data List Row Subtitle',
|
|
165
|
+
meta: 'Meta Content',
|
|
166
|
+
density: 'comfortable',
|
|
167
|
+
state: 'default',
|
|
168
|
+
showSubtitle: true,
|
|
169
|
+
showLeading: true,
|
|
170
|
+
showTrailing: true,
|
|
171
|
+
showDivider: true,
|
|
172
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: '10',
|
|
176
|
+
title: 'Data List Row Title',
|
|
177
|
+
subtitle: 'Data List Row Subtitle',
|
|
178
|
+
meta: 'Meta Content',
|
|
179
|
+
density: 'comfortable',
|
|
180
|
+
state: 'default',
|
|
181
|
+
showSubtitle: true,
|
|
182
|
+
showLeading: true,
|
|
183
|
+
showTrailing: true,
|
|
184
|
+
showDivider: true,
|
|
185
|
+
leadingImage: { uri: 'https://example.com/avatar.png' },
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
]}
|
|
190
|
+
onProfilePress={() => console.log('Profile pressed')}
|
|
191
|
+
/>
|
|
192
|
+
),
|
|
193
|
+
});
|