@campxdev/react-native-blueprint 0.1.14 → 0.1.16

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.
Files changed (222) hide show
  1. package/global.css +672 -0
  2. package/lib/module/assets/Loading Animation.json +1 -0
  3. package/lib/module/assets/Success-Tick.json +1 -0
  4. package/lib/module/assets/lotties/index.js +3 -1
  5. package/lib/module/assets/lotties/index.js.map +1 -1
  6. package/lib/module/components/DataDisplay/Accordion/Accordion.js +1 -0
  7. package/lib/module/components/DataDisplay/Accordion/Accordion.js.map +1 -1
  8. package/lib/module/components/DataDisplay/AccordionItem/AccordionItem.js +1 -0
  9. package/lib/module/components/DataDisplay/AccordionItem/AccordionItem.js.map +1 -1
  10. package/lib/module/components/DataDisplay/Badge/Badge.figma.js +1 -0
  11. package/lib/module/components/DataDisplay/Badge/Badge.figma.js.map +1 -1
  12. package/lib/module/components/DataDisplay/Badge/Badge.js +1 -0
  13. package/lib/module/components/DataDisplay/Badge/Badge.js.map +1 -1
  14. package/lib/module/components/DataDisplay/Banner/Banner.figma.js +25 -0
  15. package/lib/module/components/DataDisplay/Banner/Banner.figma.js.map +1 -0
  16. package/lib/module/components/DataDisplay/Banner/Banner.js +101 -0
  17. package/lib/module/components/DataDisplay/Banner/Banner.js.map +1 -0
  18. package/lib/module/components/DataDisplay/BannerRow/BannerRow.js +1 -0
  19. package/lib/module/components/DataDisplay/BannerRow/BannerRow.js.map +1 -1
  20. package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js +1 -0
  21. package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js.map +1 -1
  22. package/lib/module/components/DataDisplay/Card/Card.js +1 -0
  23. package/lib/module/components/DataDisplay/Card/Card.js.map +1 -1
  24. package/lib/module/components/DataDisplay/Chips/Chips.js +1 -0
  25. package/lib/module/components/DataDisplay/Chips/Chips.js.map +1 -1
  26. package/lib/module/components/DataDisplay/ChipsRow/ChipsRow.js +1 -0
  27. package/lib/module/components/DataDisplay/ChipsRow/ChipsRow.js.map +1 -1
  28. package/lib/module/components/DataDisplay/DataListItem/DataListItem.js +1 -0
  29. package/lib/module/components/DataDisplay/DataListItem/DataListItem.js.map +1 -1
  30. package/lib/module/components/DataDisplay/Datalist/Datalist.js +1 -0
  31. package/lib/module/components/DataDisplay/Datalist/Datalist.js.map +1 -1
  32. package/lib/module/components/DataDisplay/Greeting/Greeting.figma.js +15 -0
  33. package/lib/module/components/DataDisplay/Greeting/Greeting.figma.js.map +1 -0
  34. package/lib/module/components/DataDisplay/Greeting/Greeting.js +121 -0
  35. package/lib/module/components/DataDisplay/Greeting/Greeting.js.map +1 -0
  36. package/lib/module/components/DataDisplay/MonthCalendar/MonthCalendar.figma.js +5 -7
  37. package/lib/module/components/DataDisplay/MonthCalendar/MonthCalendar.figma.js.map +1 -1
  38. package/lib/module/components/DataDisplay/Separator/Separator.js +1 -0
  39. package/lib/module/components/DataDisplay/Separator/Separator.js.map +1 -1
  40. package/lib/module/components/DataDisplay/Skeleton/Skeleton.js +1 -0
  41. package/lib/module/components/DataDisplay/Skeleton/Skeleton.js.map +1 -1
  42. package/lib/module/components/DataDisplay/Tooltip/Tooltip.figma.js +1 -0
  43. package/lib/module/components/DataDisplay/Tooltip/Tooltip.figma.js.map +1 -1
  44. package/lib/module/components/DataDisplay/Tooltip/Tooltip.js +1 -0
  45. package/lib/module/components/DataDisplay/Tooltip/Tooltip.js.map +1 -1
  46. package/lib/module/components/Feedback/InfoBar/InfoBar.figma.js +32 -0
  47. package/lib/module/components/Feedback/InfoBar/InfoBar.figma.js.map +1 -0
  48. package/lib/module/components/Feedback/InfoBar/InfoBar.js +107 -0
  49. package/lib/module/components/Feedback/InfoBar/InfoBar.js.map +1 -0
  50. package/lib/module/components/Feedback/ProgressCircular/Progress-circular.js +1 -0
  51. package/lib/module/components/Feedback/ProgressCircular/Progress-circular.js.map +1 -1
  52. package/lib/module/components/Feedback/ProgressLinear/Progress-linear.js +1 -0
  53. package/lib/module/components/Feedback/ProgressLinear/Progress-linear.js.map +1 -1
  54. package/lib/module/components/Input/Button/Button.js +99 -43
  55. package/lib/module/components/Input/Button/Button.js.map +1 -1
  56. package/lib/module/components/Input/Checkbox/Checkbox.js +1 -0
  57. package/lib/module/components/Input/Checkbox/Checkbox.js.map +1 -1
  58. package/lib/module/components/Input/RadioGroup/Radio-Group.figma.js +3 -3
  59. package/lib/module/components/Input/RadioGroup/Radio-Group.figma.js.map +1 -1
  60. package/lib/module/components/Input/RadioGroup/Radio-Group.js +1 -0
  61. package/lib/module/components/Input/RadioGroup/Radio-Group.js.map +1 -1
  62. package/lib/module/components/Input/Select/Select.js +1 -0
  63. package/lib/module/components/Input/Select/Select.js.map +1 -1
  64. package/lib/module/components/Input/TextField/Textfield.figma.js +4 -2
  65. package/lib/module/components/Input/TextField/Textfield.figma.js.map +1 -1
  66. package/lib/module/components/Input/TextField/Textfield.js +219 -43
  67. package/lib/module/components/Input/TextField/Textfield.js.map +1 -1
  68. package/lib/module/components/Input/Toggle/Toggle.figma.js +32 -0
  69. package/lib/module/components/Input/Toggle/Toggle.figma.js.map +1 -0
  70. package/lib/module/components/Input/Toggle/Toggle.js +52 -23
  71. package/lib/module/components/Input/Toggle/Toggle.js.map +1 -1
  72. package/lib/module/components/Input/ToggleGroup/Toggle-Group.js +1 -0
  73. package/lib/module/components/Input/ToggleGroup/Toggle-Group.js.map +1 -1
  74. package/lib/module/components/Input/switch/Switch.figma.js +1 -0
  75. package/lib/module/components/Input/switch/Switch.figma.js.map +1 -1
  76. package/lib/module/components/Input/switch/Switch.js +1 -0
  77. package/lib/module/components/Input/switch/Switch.js.map +1 -1
  78. package/lib/module/components/Layout/Tabs/Tabs.figma.js +1 -0
  79. package/lib/module/components/Layout/Tabs/Tabs.figma.js.map +1 -1
  80. package/lib/module/components/Layout/Tabs/Tabs.js +1 -0
  81. package/lib/module/components/Layout/Tabs/Tabs.js.map +1 -1
  82. package/lib/module/components/Navigation/Appbar/AppBar.figma.js +1 -0
  83. package/lib/module/components/Navigation/Appbar/AppBar.figma.js.map +1 -1
  84. package/lib/module/components/Navigation/FloatingAction/Floating-Action.js +1 -0
  85. package/lib/module/components/Navigation/FloatingAction/Floating-Action.js.map +1 -1
  86. package/lib/module/components/Navigation/Popover/Popover.figma.js +1 -0
  87. package/lib/module/components/Navigation/Popover/Popover.figma.js.map +1 -1
  88. package/lib/module/components/Navigation/Popover/Popover.js +1 -0
  89. package/lib/module/components/Navigation/Popover/Popover.js.map +1 -1
  90. package/lib/module/components/ui/Custom-Card.js +1 -0
  91. package/lib/module/components/ui/Custom-Card.js.map +1 -1
  92. package/lib/module/components/ui/Dropdown-Menu.js +1 -0
  93. package/lib/module/components/ui/Dropdown-Menu.js.map +1 -1
  94. package/lib/module/components/ui/Hover-Card.js +1 -0
  95. package/lib/module/components/ui/Hover-Card.js.map +1 -1
  96. package/lib/module/components/ui/Icon.js +1 -0
  97. package/lib/module/components/ui/Icon.js.map +1 -1
  98. package/lib/module/components/ui/Input.js +1 -0
  99. package/lib/module/components/ui/Input.js.map +1 -1
  100. package/lib/module/components/ui/Menubar.js +1 -0
  101. package/lib/module/components/ui/Menubar.js.map +1 -1
  102. package/lib/module/components/ui/Slider.js +1 -0
  103. package/lib/module/components/ui/Slider.js.map +1 -1
  104. package/lib/module/components/ui/Table.js +1 -0
  105. package/lib/module/components/ui/Table.js.map +1 -1
  106. package/lib/module/components/ui/Toast.js +1 -0
  107. package/lib/module/components/ui/Toast.js.map +1 -1
  108. package/lib/module/components/ui/index.js +4 -1
  109. package/lib/module/components/ui/index.js.map +1 -1
  110. package/lib/module/index.js +3 -0
  111. package/lib/module/index.js.map +1 -1
  112. package/lib/module/patterns/pattern-components/AlertDialogPattern/AlertDialogPattern.js +1 -0
  113. package/lib/module/patterns/pattern-components/AlertDialogPattern/AlertDialogPattern.js.map +1 -1
  114. package/lib/module/patterns/pattern-components/AlertPattern/AlertPattern.js +1 -0
  115. package/lib/module/patterns/pattern-components/AlertPattern/AlertPattern.js.map +1 -1
  116. package/lib/module/patterns/pattern-components/BottomSheetPattern/index.js +4 -0
  117. package/lib/module/patterns/pattern-components/BottomSheetPattern/index.js.map +1 -0
  118. package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.js +1 -0
  119. package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.js.map +1 -1
  120. package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.js +1 -0
  121. package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.js.map +1 -1
  122. package/lib/module/patterns/pattern-components/CalendarPattern/index.js +4 -0
  123. package/lib/module/patterns/pattern-components/CalendarPattern/index.js.map +1 -0
  124. package/lib/module/patterns/pattern-components/DashboardPattern/index.js +4 -0
  125. package/lib/module/patterns/pattern-components/DashboardPattern/index.js.map +1 -0
  126. package/lib/module/patterns/pattern-components/EmptyState/EmptyState.js +1 -0
  127. package/lib/module/patterns/pattern-components/EmptyState/EmptyState.js.map +1 -1
  128. package/lib/module/patterns/pattern-components/EntityPatternGuided/EntityPatternGuided.js +1 -0
  129. package/lib/module/patterns/pattern-components/EntityPatternGuided/EntityPatternGuided.js.map +1 -1
  130. package/lib/module/patterns/pattern-components/EntityPatternGuided/index.js +4 -0
  131. package/lib/module/patterns/pattern-components/EntityPatternGuided/index.js.map +1 -0
  132. package/lib/module/patterns/pattern-components/EntityPatternOverview/EntityPatternOverview.js +1 -0
  133. package/lib/module/patterns/pattern-components/EntityPatternOverview/EntityPatternOverview.js.map +1 -1
  134. package/lib/module/patterns/pattern-components/EntityPatternStructured/EntityPatternStructured.js +1 -0
  135. package/lib/module/patterns/pattern-components/EntityPatternStructured/EntityPatternStructured.js.map +1 -1
  136. package/lib/module/patterns/pattern-components/FormPattern/FormPattern.js +1 -0
  137. package/lib/module/patterns/pattern-components/FormPattern/FormPattern.js.map +1 -1
  138. package/lib/module/patterns/pattern-components/SuccessPattern/SuccessPattern.figma.js +38 -0
  139. package/lib/module/patterns/pattern-components/SuccessPattern/SuccessPattern.figma.js.map +1 -0
  140. package/lib/module/patterns/pattern-components/SuccessPattern/SuccessPattern.js +91 -0
  141. package/lib/module/patterns/pattern-components/SuccessPattern/SuccessPattern.js.map +1 -0
  142. package/lib/module/patterns/pattern-components/SuccessPattern/index.js +4 -0
  143. package/lib/module/patterns/pattern-components/SuccessPattern/index.js.map +1 -0
  144. package/lib/module/patterns/pattern-components/index.js +5 -3
  145. package/lib/module/patterns/pattern-components/index.js.map +1 -1
  146. package/package.json +4 -3
  147. package/src/assets/Loading Animation.json +1 -0
  148. package/src/assets/Success-Tick.json +1 -0
  149. package/src/assets/lotties/index.ts +2 -0
  150. package/src/components/DataDisplay/Accordion/Accordion.tsx +1 -0
  151. package/src/components/DataDisplay/AccordionItem/AccordionItem.tsx +1 -0
  152. package/src/components/DataDisplay/Badge/Badge.figma.tsx +1 -0
  153. package/src/components/DataDisplay/Badge/Badge.tsx +1 -0
  154. package/src/components/DataDisplay/Banner/Banner.figma.tsx +26 -0
  155. package/src/components/DataDisplay/Banner/Banner.tsx +108 -0
  156. package/src/components/DataDisplay/BannerRow/BannerRow.tsx +1 -0
  157. package/src/components/DataDisplay/CalendarItem/CalendarItem.tsx +1 -0
  158. package/src/components/DataDisplay/Card/Card.tsx +1 -0
  159. package/src/components/DataDisplay/Chips/Chips.tsx +1 -0
  160. package/src/components/DataDisplay/ChipsRow/ChipsRow.tsx +1 -0
  161. package/src/components/DataDisplay/DataListItem/DataListItem.tsx +1 -0
  162. package/src/components/DataDisplay/Datalist/Datalist.tsx +1 -0
  163. package/src/components/DataDisplay/Greeting/Greeting.figma.tsx +12 -0
  164. package/src/components/DataDisplay/Greeting/Greeting.tsx +154 -0
  165. package/src/components/DataDisplay/MonthCalendar/MonthCalendar.figma.tsx +7 -11
  166. package/src/components/DataDisplay/Separator/Separator.tsx +1 -0
  167. package/src/components/DataDisplay/Skeleton/Skeleton.tsx +1 -0
  168. package/src/components/DataDisplay/Tooltip/Tooltip.figma.tsx +1 -0
  169. package/src/components/DataDisplay/Tooltip/Tooltip.tsx +1 -0
  170. package/src/components/Feedback/InfoBar/InfoBar.figma.tsx +31 -0
  171. package/src/components/Feedback/InfoBar/InfoBar.tsx +127 -0
  172. package/src/components/Feedback/ProgressCircular/Progress-circular.tsx +1 -0
  173. package/src/components/Feedback/ProgressLinear/Progress-linear.tsx +1 -0
  174. package/src/components/Input/Button/Button.tsx +110 -43
  175. package/src/components/Input/Checkbox/Checkbox.tsx +1 -0
  176. package/src/components/Input/RadioGroup/Radio-Group.figma.tsx +3 -3
  177. package/src/components/Input/RadioGroup/Radio-Group.tsx +1 -0
  178. package/src/components/Input/Select/Select.tsx +1 -0
  179. package/src/components/Input/TextField/Textfield.figma.tsx +2 -0
  180. package/src/components/Input/TextField/Textfield.tsx +280 -48
  181. package/src/components/Input/Toggle/Toggle.figma.tsx +37 -0
  182. package/src/components/Input/Toggle/Toggle.tsx +49 -22
  183. package/src/components/Input/ToggleGroup/Toggle-Group.tsx +1 -0
  184. package/src/components/Input/switch/Switch.figma.tsx +1 -0
  185. package/src/components/Input/switch/Switch.tsx +1 -0
  186. package/src/components/Layout/Tabs/Tabs.figma.tsx +1 -0
  187. package/src/components/Layout/Tabs/Tabs.tsx +1 -0
  188. package/src/components/Navigation/Appbar/AppBar.figma.tsx +1 -0
  189. package/src/components/Navigation/FloatingAction/Floating-Action.tsx +1 -0
  190. package/src/components/Navigation/Popover/Popover.figma.tsx +1 -0
  191. package/src/components/Navigation/Popover/Popover.tsx +1 -0
  192. package/src/components/ui/Custom-Card.tsx +1 -0
  193. package/src/components/ui/Dropdown-Menu.tsx +1 -0
  194. package/src/components/ui/Hover-Card.tsx +1 -0
  195. package/src/components/ui/Icon.tsx +1 -0
  196. package/src/components/ui/Input.tsx +1 -0
  197. package/src/components/ui/Menubar.tsx +1 -0
  198. package/src/components/ui/Slider.tsx +1 -0
  199. package/src/components/ui/Table.tsx +1 -0
  200. package/src/components/ui/Toast.tsx +1 -0
  201. package/src/components/ui/index.ts +5 -1
  202. package/src/index.tsx +3 -0
  203. package/src/patterns/pattern-components/AlertDialogPattern/AlertDialogPattern.tsx +1 -0
  204. package/src/patterns/pattern-components/AlertPattern/AlertPattern.tsx +1 -0
  205. package/src/patterns/pattern-components/BottomSheetPattern/index.ts +1 -0
  206. package/src/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.tsx +1 -0
  207. package/src/patterns/pattern-components/CalendarPattern/CalendarPattern.tsx +1 -0
  208. package/src/patterns/pattern-components/CalendarPattern/index.ts +1 -0
  209. package/src/patterns/pattern-components/DashboardPattern/index.ts +1 -0
  210. package/src/patterns/pattern-components/EmptyState/EmptyState.tsx +1 -0
  211. package/src/patterns/pattern-components/EntityPatternGuided/EntityPatternGuided.tsx +1 -0
  212. package/src/patterns/pattern-components/EntityPatternGuided/index.ts +1 -0
  213. package/src/patterns/pattern-components/EntityPatternOverview/EntityPatternOverview.tsx +1 -0
  214. package/src/patterns/pattern-components/EntityPatternStructured/EntityPatternStructured.tsx +1 -0
  215. package/src/patterns/pattern-components/FormPattern/FormPattern.tsx +1 -0
  216. package/src/patterns/pattern-components/SuccessPattern/SuccessPattern.figma.tsx +38 -0
  217. package/src/patterns/pattern-components/SuccessPattern/SuccessPattern.tsx +119 -0
  218. package/src/patterns/pattern-components/SuccessPattern/index.ts +2 -0
  219. package/src/patterns/pattern-components/index.ts +3 -1
  220. package/lib/module/components/ui/Greeting-Card.js +0 -392
  221. package/lib/module/components/ui/Greeting-Card.js.map +0 -1
  222. package/src/components/ui/Greeting-Card.tsx +0 -471
@@ -0,0 +1,108 @@
1
+ // @ts-nocheck
2
+ import React from 'react';
3
+ import { View as RNView, Pressable as RNPressable } from 'react-native';
4
+ import { cssInterop } from 'nativewind';
5
+ import { LinearGradient } from 'expo-linear-gradient';
6
+ import { Plus } from 'lucide-react-native';
7
+ import { Text } from '../../Input/Text/Text';
8
+ import { Badge } from '../Badge/Badge';
9
+ import { Icon } from '../../ui/Icon';
10
+
11
+ cssInterop(RNView, { className: 'style' });
12
+ cssInterop(RNPressable, { className: 'style' });
13
+ cssInterop(LinearGradient, { className: 'style' });
14
+
15
+ const View = RNView as React.ComponentType<
16
+ React.ComponentProps<typeof RNView> & { className?: string }
17
+ >;
18
+ const Pressable = RNPressable as React.ComponentType<
19
+ React.ComponentProps<typeof RNPressable> & { className?: string }
20
+ >;
21
+
22
+ // ============================================================================
23
+ // TYPES
24
+ // ============================================================================
25
+
26
+ export interface BannerProps {
27
+ title?: string;
28
+ subtitle?: string;
29
+ showBadge?: boolean;
30
+ badgeText?: string;
31
+ showActionItems?: boolean;
32
+ actionItems?: string[];
33
+ showTrailing?: boolean;
34
+ onTrailingPress?: () => void;
35
+ testID?: string;
36
+ }
37
+
38
+ // ============================================================================
39
+ // MAIN COMPONENT
40
+ // ============================================================================
41
+
42
+ function Banner({
43
+ title = 'Banner Title',
44
+ subtitle = 'Subtitle of the banner goes here',
45
+ showBadge = true,
46
+ badgeText = 'Badge',
47
+ showActionItems = true,
48
+ actionItems = ['Action Item', 'Action Item', 'Action Item'],
49
+ showTrailing = true,
50
+ onTrailingPress,
51
+ testID,
52
+ }: BannerProps) {
53
+ return (
54
+ <LinearGradient
55
+ testID={testID}
56
+ colors={['#573dab', '#573dab33']}
57
+ start={{ x: 0, y: 0 }}
58
+ end={{ x: 1, y: 1 }}
59
+ className="w-full max-w-[400px] flex-row items-center justify-between gap-4 rounded-lg p-4"
60
+ >
61
+ {/* Main Content */}
62
+ <View className="flex-1 flex-col gap-5">
63
+ {/* Header with Title and Badge */}
64
+ <View className="flex-col gap-1">
65
+ <View className="flex-row items-center gap-2">
66
+ <Text className="font-semibold text-base text-white">{title}</Text>
67
+ {showBadge && (
68
+ <Badge variant="default" size="sm">
69
+ <Text>{badgeText}</Text>
70
+ </Badge>
71
+ )}
72
+ </View>
73
+ <Text className="font-medium text-xs text-white opacity-70">
74
+ {subtitle}
75
+ </Text>
76
+ </View>
77
+
78
+ {/* Action Items */}
79
+ {showActionItems && actionItems && actionItems.length > 0 && (
80
+ <View className="flex-row items-center gap-3">
81
+ {actionItems.map((item, index) => (
82
+ <React.Fragment key={index}>
83
+ {index > 0 && (
84
+ <View className="h-1 w-1 rounded-full bg-white" />
85
+ )}
86
+ <Text className="font-medium text-xs text-white">{item}</Text>
87
+ </React.Fragment>
88
+ ))}
89
+ </View>
90
+ )}
91
+ </View>
92
+
93
+ {/* Trailing Icon */}
94
+ {showTrailing && (
95
+ <Pressable
96
+ onPress={onTrailingPress}
97
+ hitSlop={12}
98
+ className="flex-row items-center justify-center"
99
+ >
100
+ <Icon as={Plus} size={16} color="white" />
101
+ </Pressable>
102
+ )}
103
+ </LinearGradient>
104
+ );
105
+ }
106
+
107
+ export { Banner };
108
+ export default Banner;
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import { View, ScrollView, type StyleProp, type ViewStyle } from 'react-native';
3
4
  import { LinearGradient } from 'expo-linear-gradient';
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import { View, type StyleProp, type ViewStyle } from 'react-native';
3
4
  import { cssInterop } from 'nativewind';
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import {
2
3
  View as RNView,
3
4
  Text as RNTextBase,
@@ -1,4 +1,5 @@
1
1
  /// <reference types="nativewind/types" />
2
+ // @ts-nocheck
2
3
  import * as React from 'react';
3
4
  import {
4
5
  View,
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import { ScrollView, View, type StyleProp, type ViewStyle } from 'react-native';
3
4
  import { cssInterop } from 'nativewind';
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import {
3
4
  Image,
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import { View } from 'react-native';
3
4
  import { cva, type VariantProps } from 'class-variance-authority';
@@ -0,0 +1,12 @@
1
+ import figma from '@figma/code-connect';
2
+ import { Greeting } from './Greeting';
3
+
4
+ const FIGMA_URL =
5
+ 'https://www.figma.com/design/66WaqopqU3WXgwVtyQuTUf/React-Native-Blueprint-Library?node-id=448-8146';
6
+
7
+ figma.connect(Greeting, FIGMA_URL, {
8
+ props: {
9
+ showNextUp: figma.boolean('Show NextUp'),
10
+ },
11
+ example: (props) => <Greeting showNextUp={props.showNextUp} />,
12
+ });
@@ -0,0 +1,154 @@
1
+ // @ts-nocheck
2
+ import * as React from 'react';
3
+ import {
4
+ Pressable as RNPressable,
5
+ StyleSheet,
6
+ View as RNView,
7
+ } from 'react-native';
8
+ import { cssInterop } from 'nativewind';
9
+ import { Calendar } from 'lucide-react-native';
10
+ import { cn } from '../../../lib/utils';
11
+ import { Text } from '../../Input/Text/Text';
12
+ import { Icon } from '../../ui/Icon';
13
+
14
+ cssInterop(RNView, { className: 'style' });
15
+ cssInterop(RNPressable, { className: 'style' });
16
+
17
+ const View = RNView as React.ComponentType<
18
+ React.ComponentProps<typeof RNView> & { className?: string }
19
+ >;
20
+ const Pressable = RNPressable as React.ComponentType<
21
+ React.ComponentProps<typeof RNPressable> & { className?: string }
22
+ >;
23
+
24
+ /**
25
+ * Props for the Greeting component
26
+ */
27
+ export interface GreetingProps {
28
+ /** User's name to display in greeting */
29
+ userName?: string;
30
+ /** Greeting message (e.g., "Good Morning") */
31
+ greetingText?: string;
32
+ /** Subtitle/secondary text below greeting */
33
+ subtitle?: string;
34
+ /** Whether to show the schedule/calendar button */
35
+ showScheduleButton?: boolean;
36
+ /** Callback when schedule button is pressed */
37
+ onSchedulePress?: () => void;
38
+ /** Whether to show the "Next up" section */
39
+ showNextUp?: boolean;
40
+ /** Next class/course name */
41
+ nextUpTitle?: string;
42
+ /** Time for next class */
43
+ nextUpTime?: string;
44
+ /** Additional CSS classes for styling */
45
+ className?: string;
46
+ /** Test identifier */
47
+ testID?: string;
48
+ }
49
+
50
+ /**
51
+ * Greeting - A personalized greeting card with schedule information
52
+ *
53
+ * Displays a personalized greeting with user name, class information, and upcoming
54
+ * class details. Features a prominent purple schedule button with calendar icon,
55
+ * "Next up" section with course name and time, and flexible visibility controls.
56
+ *
57
+ * Design from Figma: node-id=448-8146
58
+ * - Header: "Hey {name}, {greeting}" + Subtitle
59
+ * - Schedule Button: Purple (#573dab) with calendar icon and shadow
60
+ * - Next Up: Course name + divider dot + time
61
+ *
62
+ * @component
63
+ * @example
64
+ * ```tsx
65
+ * <Greeting
66
+ * userName="Marshall"
67
+ * greetingText="Good Morning"
68
+ * subtitle="You have 3 Classes today"
69
+ * nextUpTitle="Digital Logic Design"
70
+ * nextUpTime="10:00 AM"
71
+ * showNextUp={true}
72
+ * onSchedulePress={() => navigate('Schedule')}
73
+ * />
74
+ * ```
75
+ */
76
+ export function Greeting({
77
+ userName = 'Marshall',
78
+ greetingText = 'Good Morning',
79
+ subtitle = 'You have 3 Classes today',
80
+ showScheduleButton = true,
81
+ onSchedulePress,
82
+ showNextUp = true,
83
+ nextUpTitle = 'Digital Logic Design',
84
+ nextUpTime = '10:00 AM',
85
+ className,
86
+ testID,
87
+ }: GreetingProps) {
88
+ return (
89
+ <View
90
+ testID={testID}
91
+ className={cn(
92
+ 'w-full max-w-[400px] flex-col gap-4 items-start justify-end rounded-lg border border-border-default bg-surface-default px-3 py-4',
93
+ className
94
+ )}
95
+ >
96
+ {/* Header Section: Greeting + Schedule Button */}
97
+ <View className="w-full flex-row items-center justify-between">
98
+ {/* Header Content: Title and Subtitle */}
99
+ <View className="flex-1 flex-col gap-1">
100
+ <Text className="font-semibold text-base text-text-primary">
101
+ {`Hey ${userName}, ${greetingText}`}
102
+ </Text>
103
+ <Text className="font-medium text-xs text-text-secondary">
104
+ {subtitle}
105
+ </Text>
106
+ </View>
107
+
108
+ {/* Schedule Button with Calendar Icon */}
109
+ {showScheduleButton && (
110
+ <Pressable
111
+ onPress={onSchedulePress}
112
+ hitSlop={12}
113
+ className="ml-3 flex-row items-center justify-center rounded-lg bg-highlight-purple p-3"
114
+ style={styles.scheduleButton}
115
+ >
116
+ <Icon as={Calendar} size={16} color="white" />
117
+ </Pressable>
118
+ )}
119
+ </View>
120
+
121
+ {/* Next Up Section */}
122
+ {showNextUp && (
123
+ <View className="w-full flex-col gap-1">
124
+ <Text className="font-medium text-xs text-text-secondary">
125
+ Next up
126
+ </Text>
127
+ {/* Next Up Items: Course Name + Divider + Time */}
128
+ <View className="w-full flex-row items-center gap-3">
129
+ <Text className="font-semibold text-base text-text-primary">
130
+ {nextUpTitle}
131
+ </Text>
132
+ {/* Divider Dot */}
133
+ <View className="h-1.5 w-1.5 rounded-full bg-text-secondary" />
134
+ <Text className="font-semibold text-base text-text-primary">
135
+ {nextUpTime}
136
+ </Text>
137
+ </View>
138
+ </View>
139
+ )}
140
+ </View>
141
+ );
142
+ }
143
+
144
+ Greeting.displayName = 'Greeting';
145
+
146
+ const styles = StyleSheet.create({
147
+ scheduleButton: {
148
+ shadowColor: '#573dab',
149
+ shadowOffset: { width: 0, height: 0 },
150
+ shadowOpacity: 0.5,
151
+ shadowRadius: 12,
152
+ elevation: 8,
153
+ },
154
+ });
@@ -1,15 +1,11 @@
1
- import { figma } from '@figma/code-connect';
1
+ import figma from '@figma/code-connect';
2
2
  import { MonthCalendar } from './MonthCalendar';
3
3
 
4
- figma.connect(
5
- MonthCalendar,
6
- 'https://www.figma.com/design/66WaqopqU3WXgwVtyQuTUf/React-Native-Blueprint-Library?node-id=306:9028',
7
- {
8
- props: {
9
- month: figma.string('Month'),
10
- },
11
- example: (props) => <MonthCalendar {...props} />,
12
- }
13
- );
4
+ const FIGMA_URL =
5
+ 'https://www.figma.com/design/66WaqopqU3WXgwVtyQuTUf/React-Native-Blueprint-Library?node-id=306:9028';
6
+
7
+ figma.connect(MonthCalendar, FIGMA_URL, {
8
+ example: () => <MonthCalendar month="February 2024" />,
9
+ });
14
10
 
15
11
  export default MonthCalendar;
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import { View, type StyleProp, type ViewStyle } from 'react-native';
3
4
  import { cssInterop } from 'nativewind';
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import { View, type StyleProp, type ViewStyle } from 'react-native';
3
4
  import { cssInterop } from 'nativewind';
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import figma from '@figma/code-connect';
2
3
  import * as React from 'react';
3
4
  import { Tooltip, TooltipTrigger, TooltipContent } from './Tooltip';
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import { Platform } from 'react-native';
3
4
 
@@ -0,0 +1,31 @@
1
+ import figma from '@figma/code-connect';
2
+ import { InfoBar } from './InfoBar';
3
+
4
+ const FIGMA_URL =
5
+ 'https://www.figma.com/design/66WaqopqU3WXgwVtyQuTUf/React-Native-Blueprint-Library?node-id=375-5879';
6
+
7
+ figma.connect(InfoBar, FIGMA_URL, {
8
+ props: {
9
+ title: figma.string('Title'),
10
+ description: figma.string('Description'),
11
+ showCloseIcon: figma.boolean('Show closeIcon'),
12
+ showAlertContent: figma.boolean('Show alertContent'),
13
+ showIconContainer: figma.boolean('Show iconContainer'),
14
+ showInfoBarDescription: figma.boolean('Show InfoBarDescription'),
15
+ },
16
+ example: (props) => (
17
+ <InfoBar
18
+ title={props.title}
19
+ description={props.description}
20
+ showCloseIcon={props.showCloseIcon}
21
+ showAlertContent={props.showAlertContent}
22
+ showIconContainer={props.showIconContainer}
23
+ showInfoBarDescription={props.showInfoBarDescription}
24
+ alertContent={[
25
+ { text: 'Point 1 of Content' },
26
+ { text: 'Point 2 of the Content' },
27
+ { text: 'Point 3 of the Content' },
28
+ ]}
29
+ />
30
+ ),
31
+ });
@@ -0,0 +1,127 @@
1
+ // @ts-nocheck
2
+ import React from 'react';
3
+ import { View as RNView, Pressable as RNPressable } from 'react-native';
4
+ import { cssInterop } from 'nativewind';
5
+ import { X } from 'lucide-react-native';
6
+ import { Text } from '../../Input/Text/Text';
7
+ import { Icon } from '../../ui/Icon';
8
+
9
+ cssInterop(RNView, { className: 'style' });
10
+ cssInterop(RNPressable, { className: 'style' });
11
+
12
+ const View = RNView as React.ComponentType<
13
+ React.ComponentProps<typeof RNView> & { className?: string }
14
+ >;
15
+ const Pressable = RNPressable as React.ComponentType<
16
+ React.ComponentProps<typeof RNPressable> & { className?: string }
17
+ >;
18
+
19
+ // ============================================================================
20
+ // TYPES
21
+ // ============================================================================
22
+
23
+ export interface InfoBarProps {
24
+ title?: string;
25
+ description?: string;
26
+ showCloseIcon?: boolean;
27
+ showAlertContent?: boolean;
28
+ showIconContainer?: boolean;
29
+ showInfoBarDescription?: boolean;
30
+ alertContent?: Array<{ text: string }>;
31
+ onClose?: () => void;
32
+ icon?: React.ComponentType<{ size: number; color: string }>;
33
+ testID?: string;
34
+ }
35
+
36
+ // ============================================================================
37
+ // MAIN COMPONENT
38
+ // ============================================================================
39
+
40
+ function InfoBar({
41
+ title = 'This is the Info Bar title',
42
+ description = 'Infobar description goes here. It can be one or two lines.',
43
+ showCloseIcon = true,
44
+ showAlertContent = true,
45
+ showIconContainer = true,
46
+ showInfoBarDescription = true,
47
+ alertContent = [
48
+ { text: 'Point 1 of Content' },
49
+ { text: 'Point 2 of the Content' },
50
+ { text: 'Point 3 of the Content' },
51
+ ],
52
+ onClose,
53
+ icon: IconComponent,
54
+ testID,
55
+ }: InfoBarProps) {
56
+ return (
57
+ <View className="w-full flex-col items-start gap-3 justify-center">
58
+ <View
59
+ testID={testID}
60
+ className="bg-[#573dab33] flex-col items-start gap-3 p-5 rounded-[var(--radius-lg)]"
61
+ >
62
+ <View className="w-full flex-col items-start gap-2 justify-center">
63
+ {/* Icon Container & Close Button */}
64
+ {showIconContainer && (
65
+ <View className="w-full flex-row items-start justify-between">
66
+ <View className="flex-1 flex-row items-center">
67
+ {IconComponent && (
68
+ <Icon as={IconComponent} size={16} color="#573dab" />
69
+ )}
70
+ </View>
71
+
72
+ {showCloseIcon && (
73
+ <Pressable
74
+ onPress={onClose}
75
+ hitSlop={12}
76
+ style={{
77
+ width: 16,
78
+ height: 16,
79
+ justifyContent: 'center',
80
+ alignItems: 'center',
81
+ }}
82
+ >
83
+ <Icon as={X} size={16} color="#573dab" />
84
+ </Pressable>
85
+ )}
86
+ </View>
87
+ )}
88
+
89
+ {/* Content: Title & Description */}
90
+ <View className="w-full flex-col items-start gap-2">
91
+ <View className="w-full flex-col items-start gap-1">
92
+ <Text className="font-semibold text-base text-[var(--colors-text-primary)]">
93
+ {title}
94
+ </Text>
95
+
96
+ {showInfoBarDescription && (
97
+ <Text className="font-medium text-xs opacity-70 text-[var(--colors-text-primary)]">
98
+ {description}
99
+ </Text>
100
+ )}
101
+ </View>
102
+ </View>
103
+
104
+ {/* Alert Content - Bullet Points */}
105
+ {showAlertContent && alertContent && alertContent.length > 0 && (
106
+ <View className="w-full flex-col items-start gap-2">
107
+ {alertContent.map((item, index) => (
108
+ <View
109
+ key={index}
110
+ className="w-full flex-row items-center gap-1"
111
+ >
112
+ <View className="w-1 h-1 rounded-full bg-[var(--colors-text-primary)]" />
113
+ <Text className="font-normal text-xs text-[var(--colors-text-primary)]">
114
+ {item.text}
115
+ </Text>
116
+ </View>
117
+ ))}
118
+ </View>
119
+ )}
120
+ </View>
121
+ </View>
122
+ </View>
123
+ );
124
+ }
125
+
126
+ export { InfoBar };
127
+ export default InfoBar;
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import { View, type StyleProp, type ViewStyle } from 'react-native';
3
4
  import { cssInterop } from 'nativewind';
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as React from 'react';
2
3
  import { View, type StyleProp, type ViewStyle } from 'react-native';
3
4
  import { cssInterop } from 'nativewind';