@campxdev/react-native-blueprint 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +358 -0
  3. package/lib/module/app/_layout.js +23 -0
  4. package/lib/module/app/_layout.js.map +1 -0
  5. package/lib/module/assets/icons/weather_icons/drizzle.png +0 -0
  6. package/lib/module/assets/icons/weather_icons/foggy.png +0 -0
  7. package/lib/module/assets/icons/weather_icons/freezing_rain.png +0 -0
  8. package/lib/module/assets/icons/weather_icons/partly_cloudy.png +0 -0
  9. package/lib/module/assets/icons/weather_icons/rainy.png +0 -0
  10. package/lib/module/assets/icons/weather_icons/showers.png +0 -0
  11. package/lib/module/assets/icons/weather_icons/sunny_weather.png +0 -0
  12. package/lib/module/assets/icons/weather_icons/thunderstorm.png +0 -0
  13. package/lib/module/assets/icons/weather_icons/thunderstorm_hail.png +0 -0
  14. package/lib/module/components/theme-config.js +265 -0
  15. package/lib/module/components/theme-config.js.map +1 -0
  16. package/lib/module/components/ui/Accordion.js +228 -0
  17. package/lib/module/components/ui/Accordion.js.map +1 -0
  18. package/lib/module/components/ui/Alert-Dialog.js +266 -0
  19. package/lib/module/components/ui/Alert-Dialog.js.map +1 -0
  20. package/lib/module/components/ui/Alert.js +107 -0
  21. package/lib/module/components/ui/Alert.js.map +1 -0
  22. package/lib/module/components/ui/AppBar.js +403 -0
  23. package/lib/module/components/ui/AppBar.js.map +1 -0
  24. package/lib/module/components/ui/Aspect-Ratio.js +27 -0
  25. package/lib/module/components/ui/Aspect-Ratio.js.map +1 -0
  26. package/lib/module/components/ui/Avatar.js +97 -0
  27. package/lib/module/components/ui/Avatar.js.map +1 -0
  28. package/lib/module/components/ui/Badge.js +127 -0
  29. package/lib/module/components/ui/Badge.js.map +1 -0
  30. package/lib/module/components/ui/Bottom-Sheet.js +144 -0
  31. package/lib/module/components/ui/Bottom-Sheet.js.map +1 -0
  32. package/lib/module/components/ui/Button.js +88 -0
  33. package/lib/module/components/ui/Button.js.map +1 -0
  34. package/lib/module/components/ui/Card.js +176 -0
  35. package/lib/module/components/ui/Card.js.map +1 -0
  36. package/lib/module/components/ui/Checkbox.js +65 -0
  37. package/lib/module/components/ui/Checkbox.js.map +1 -0
  38. package/lib/module/components/ui/Collapsible.js +42 -0
  39. package/lib/module/components/ui/Collapsible.js.map +1 -0
  40. package/lib/module/components/ui/Context-Menu.js +287 -0
  41. package/lib/module/components/ui/Context-Menu.js.map +1 -0
  42. package/lib/module/components/ui/Custom-Card.js +202 -0
  43. package/lib/module/components/ui/Custom-Card.js.map +1 -0
  44. package/lib/module/components/ui/Dialog.js +202 -0
  45. package/lib/module/components/ui/Dialog.js.map +1 -0
  46. package/lib/module/components/ui/Dropdown-Menu.js +421 -0
  47. package/lib/module/components/ui/Dropdown-Menu.js.map +1 -0
  48. package/lib/module/components/ui/Floating-Action.js +50 -0
  49. package/lib/module/components/ui/Floating-Action.js.map +1 -0
  50. package/lib/module/components/ui/Greeting-Card.js +392 -0
  51. package/lib/module/components/ui/Greeting-Card.js.map +1 -0
  52. package/lib/module/components/ui/Hover-Card.js +96 -0
  53. package/lib/module/components/ui/Hover-Card.js.map +1 -0
  54. package/lib/module/components/ui/Icon.js +73 -0
  55. package/lib/module/components/ui/Icon.js.map +1 -0
  56. package/lib/module/components/ui/Input.js +74 -0
  57. package/lib/module/components/ui/Input.js.map +1 -0
  58. package/lib/module/components/ui/Label.js +44 -0
  59. package/lib/module/components/ui/Label.js.map +1 -0
  60. package/lib/module/components/ui/Menubar.js +375 -0
  61. package/lib/module/components/ui/Menubar.js.map +1 -0
  62. package/lib/module/components/ui/Native-Only-Animated-View.js +41 -0
  63. package/lib/module/components/ui/Native-Only-Animated-View.js.map +1 -0
  64. package/lib/module/components/ui/NavBar.js +352 -0
  65. package/lib/module/components/ui/NavBar.js.map +1 -0
  66. package/lib/module/components/ui/Popover.js +101 -0
  67. package/lib/module/components/ui/Popover.js.map +1 -0
  68. package/lib/module/components/ui/Progress.js +124 -0
  69. package/lib/module/components/ui/Progress.js.map +1 -0
  70. package/lib/module/components/ui/Radio-Group.js +75 -0
  71. package/lib/module/components/ui/Radio-Group.js.map +1 -0
  72. package/lib/module/components/ui/Select.js +269 -0
  73. package/lib/module/components/ui/Select.js.map +1 -0
  74. package/lib/module/components/ui/Separator.js +58 -0
  75. package/lib/module/components/ui/Separator.js.map +1 -0
  76. package/lib/module/components/ui/SizedBox.js +101 -0
  77. package/lib/module/components/ui/SizedBox.js.map +1 -0
  78. package/lib/module/components/ui/Skeleton.js +57 -0
  79. package/lib/module/components/ui/Skeleton.js.map +1 -0
  80. package/lib/module/components/ui/Slider.js +169 -0
  81. package/lib/module/components/ui/Slider.js.map +1 -0
  82. package/lib/module/components/ui/Switch.js +55 -0
  83. package/lib/module/components/ui/Switch.js.map +1 -0
  84. package/lib/module/components/ui/Table.js +150 -0
  85. package/lib/module/components/ui/Table.js.map +1 -0
  86. package/lib/module/components/ui/Tabs.js +106 -0
  87. package/lib/module/components/ui/Tabs.js.map +1 -0
  88. package/lib/module/components/ui/Text.js +69 -0
  89. package/lib/module/components/ui/Text.js.map +1 -0
  90. package/lib/module/components/ui/Textarea.js +88 -0
  91. package/lib/module/components/ui/Textarea.js.map +1 -0
  92. package/lib/module/components/ui/Theme-Toggle.js +156 -0
  93. package/lib/module/components/ui/Theme-Toggle.js.map +1 -0
  94. package/lib/module/components/ui/Toast.js +101 -0
  95. package/lib/module/components/ui/Toast.js.map +1 -0
  96. package/lib/module/components/ui/Toggle-Group.js +129 -0
  97. package/lib/module/components/ui/Toggle-Group.js.map +1 -0
  98. package/lib/module/components/ui/Toggle.js +106 -0
  99. package/lib/module/components/ui/Toggle.js.map +1 -0
  100. package/lib/module/components/ui/Tooltip.js +106 -0
  101. package/lib/module/components/ui/Tooltip.js.map +1 -0
  102. package/lib/module/components/ui/index.js +45 -0
  103. package/lib/module/components/ui/index.js.map +1 -0
  104. package/lib/module/index.js +19 -0
  105. package/lib/module/index.js.map +1 -0
  106. package/lib/module/lib/ThemeProvider.js +173 -0
  107. package/lib/module/lib/ThemeProvider.js.map +1 -0
  108. package/lib/module/lib/cornerRadius.js +164 -0
  109. package/lib/module/lib/cornerRadius.js.map +1 -0
  110. package/lib/module/lib/fonts.js +25 -0
  111. package/lib/module/lib/fonts.js.map +1 -0
  112. package/lib/module/lib/theme.js +212 -0
  113. package/lib/module/lib/theme.js.map +1 -0
  114. package/lib/module/lib/utils.js +137 -0
  115. package/lib/module/lib/utils.js.map +1 -0
  116. package/lib/module/package.json +1 -0
  117. package/package.json +208 -0
  118. package/src/app/_layout.tsx +25 -0
  119. package/src/assets/icons/weather_icons/drizzle.png +0 -0
  120. package/src/assets/icons/weather_icons/foggy.png +0 -0
  121. package/src/assets/icons/weather_icons/freezing_rain.png +0 -0
  122. package/src/assets/icons/weather_icons/partly_cloudy.png +0 -0
  123. package/src/assets/icons/weather_icons/rainy.png +0 -0
  124. package/src/assets/icons/weather_icons/showers.png +0 -0
  125. package/src/assets/icons/weather_icons/sunny_weather.png +0 -0
  126. package/src/assets/icons/weather_icons/thunderstorm.png +0 -0
  127. package/src/assets/icons/weather_icons/thunderstorm_hail.png +0 -0
  128. package/src/components/theme-config.ts +331 -0
  129. package/src/components/ui/Accordion.tsx +253 -0
  130. package/src/components/ui/Alert-Dialog.tsx +295 -0
  131. package/src/components/ui/Alert.tsx +137 -0
  132. package/src/components/ui/AppBar.tsx +551 -0
  133. package/src/components/ui/Aspect-Ratio.tsx +25 -0
  134. package/src/components/ui/Avatar.tsx +103 -0
  135. package/src/components/ui/Badge.tsx +121 -0
  136. package/src/components/ui/Bottom-Sheet.tsx +224 -0
  137. package/src/components/ui/Button.tsx +100 -0
  138. package/src/components/ui/Card.tsx +185 -0
  139. package/src/components/ui/Checkbox.tsx +81 -0
  140. package/src/components/ui/Collapsible.tsx +40 -0
  141. package/src/components/ui/Context-Menu.tsx +407 -0
  142. package/src/components/ui/Custom-Card.tsx +226 -0
  143. package/src/components/ui/Dialog.tsx +240 -0
  144. package/src/components/ui/Dropdown-Menu.tsx +544 -0
  145. package/src/components/ui/Floating-Action.tsx +54 -0
  146. package/src/components/ui/Greeting-Card.tsx +471 -0
  147. package/src/components/ui/Hover-Card.tsx +101 -0
  148. package/src/components/ui/Icon.tsx +75 -0
  149. package/src/components/ui/Input.tsx +90 -0
  150. package/src/components/ui/Label.tsx +48 -0
  151. package/src/components/ui/Menubar.tsx +509 -0
  152. package/src/components/ui/Native-Only-Animated-View.tsx +37 -0
  153. package/src/components/ui/NavBar.tsx +397 -0
  154. package/src/components/ui/Popover.tsx +110 -0
  155. package/src/components/ui/Progress.tsx +138 -0
  156. package/src/components/ui/Radio-Group.tsx +79 -0
  157. package/src/components/ui/Select.tsx +344 -0
  158. package/src/components/ui/Separator.tsx +68 -0
  159. package/src/components/ui/SizedBox.tsx +116 -0
  160. package/src/components/ui/Skeleton.tsx +55 -0
  161. package/src/components/ui/Slider.tsx +222 -0
  162. package/src/components/ui/Switch.tsx +67 -0
  163. package/src/components/ui/Table.tsx +170 -0
  164. package/src/components/ui/Tabs.tsx +119 -0
  165. package/src/components/ui/Text.tsx +73 -0
  166. package/src/components/ui/Textarea.tsx +93 -0
  167. package/src/components/ui/Theme-Toggle.tsx +204 -0
  168. package/src/components/ui/Toast.tsx +127 -0
  169. package/src/components/ui/Toggle-Group.tsx +160 -0
  170. package/src/components/ui/Toggle.tsx +122 -0
  171. package/src/components/ui/Tooltip.tsx +117 -0
  172. package/src/components/ui/index.ts +42 -0
  173. package/src/index.tsx +24 -0
  174. package/src/lib/ThemeProvider.tsx +204 -0
  175. package/src/lib/cornerRadius.ts +160 -0
  176. package/src/lib/fonts.ts +28 -0
  177. package/src/lib/theme.ts +151 -0
  178. package/src/lib/utils.ts +146 -0
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+
3
+ import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef } from 'react';
4
+ import { StyleSheet, View } from 'react-native';
5
+ import BottomSheetPrimitive, { BottomSheetBackdrop, BottomSheetView } from '@gorhom/bottom-sheet';
6
+ import { cn } from "../../lib/utils.js";
7
+ import { useTheme } from "../../lib/ThemeProvider.js";
8
+ import { hslToRgb } from "../theme-config.js";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ const BottomSheet = /*#__PURE__*/forwardRef(({
11
+ children,
12
+ snapPoints: customSnapPoints,
13
+ initialSnapIndex = -1,
14
+ enablePanDownToClose = true,
15
+ enableDynamicSizing = false,
16
+ backdropOpacity = 0.5,
17
+ enableBackdropDismiss = true,
18
+ handleIndicatorStyle,
19
+ backgroundStyle,
20
+ className,
21
+ containerClassName,
22
+ onChange,
23
+ onClose
24
+ }, ref) => {
25
+ const bottomSheetRef = useRef(null);
26
+ const {
27
+ colors
28
+ } = useTheme();
29
+
30
+ // Default snap points if not provided
31
+ const snapPoints = useMemo(() => customSnapPoints ?? ['25%', '50%', '90%'], [customSnapPoints]);
32
+
33
+ // Expose methods via ref (similar to Flutter's showModalBottomSheet)
34
+ useImperativeHandle(ref, () => ({
35
+ open: () => bottomSheetRef.current?.expand(),
36
+ close: () => bottomSheetRef.current?.close(),
37
+ expand: () => bottomSheetRef.current?.expand(),
38
+ collapse: () => bottomSheetRef.current?.collapse(),
39
+ snapToIndex: index => bottomSheetRef.current?.snapToIndex(index)
40
+ }));
41
+
42
+ // Custom backdrop component
43
+ const renderBackdrop = useCallback(props => /*#__PURE__*/_jsx(BottomSheetBackdrop, {
44
+ ...props,
45
+ opacity: backdropOpacity,
46
+ appearsOnIndex: 0,
47
+ disappearsOnIndex: -1,
48
+ pressBehavior: enableBackdropDismiss ? 'close' : 'none'
49
+ }), [backdropOpacity, enableBackdropDismiss]);
50
+
51
+ // Handle sheet changes
52
+ const handleSheetChanges = useCallback(index => {
53
+ onChange?.(index);
54
+ if (index === -1) {
55
+ onClose?.();
56
+ }
57
+ }, [onChange, onClose]);
58
+
59
+ // Theme-aware background style - convert HSL to RGB for React Native
60
+ const themedBackgroundStyle = useMemo(() => [styles.background, {
61
+ backgroundColor: hslToRgb(colors.card)
62
+ }, backgroundStyle], [colors.card, backgroundStyle]);
63
+
64
+ // Theme-aware handle indicator style - convert HSL to RGB for React Native
65
+ const themedHandleStyle = useMemo(() => [styles.handleIndicator, {
66
+ backgroundColor: hslToRgb(colors.border)
67
+ }, handleIndicatorStyle], [colors.border, handleIndicatorStyle]);
68
+ return /*#__PURE__*/_jsx(BottomSheetPrimitive, {
69
+ ref: bottomSheetRef,
70
+ index: initialSnapIndex,
71
+ snapPoints: snapPoints,
72
+ enablePanDownToClose: enablePanDownToClose,
73
+ enableDynamicSizing: enableDynamicSizing,
74
+ backdropComponent: renderBackdrop,
75
+ onChange: handleSheetChanges,
76
+ handleIndicatorStyle: themedHandleStyle,
77
+ backgroundStyle: themedBackgroundStyle,
78
+ style: styles.container,
79
+ animateOnMount: false,
80
+ children: /*#__PURE__*/_jsx(BottomSheetView, {
81
+ style: [styles.contentContainer],
82
+ className: cn('flex-1 bg-card', containerClassName),
83
+ children: /*#__PURE__*/_jsx(View, {
84
+ className: cn('flex-1', className),
85
+ children: children
86
+ })
87
+ })
88
+ });
89
+ });
90
+ BottomSheet.displayName = 'BottomSheet';
91
+ const styles = StyleSheet.create({
92
+ container: {
93
+ zIndex: 9999
94
+ },
95
+ contentContainer: {
96
+ flex: 1
97
+ },
98
+ background: {
99
+ borderTopLeftRadius: 20,
100
+ borderTopRightRadius: 20
101
+ },
102
+ handleIndicator: {
103
+ width: 40,
104
+ height: 4
105
+ }
106
+ });
107
+
108
+ // Helper component for bottom sheet header
109
+
110
+ const BottomSheetHeader = ({
111
+ children,
112
+ className
113
+ }) => {
114
+ return /*#__PURE__*/_jsx(View, {
115
+ className: cn('border-b border-border px-4 py-3 web:px-6', className),
116
+ children: children
117
+ });
118
+ };
119
+
120
+ // Helper component for bottom sheet content
121
+
122
+ const BottomSheetContent = ({
123
+ children,
124
+ className
125
+ }) => {
126
+ return /*#__PURE__*/_jsx(View, {
127
+ className: cn('flex-1 px-4 py-4 web:px-6', className),
128
+ children: children
129
+ });
130
+ };
131
+
132
+ // Helper component for bottom sheet footer
133
+
134
+ const BottomSheetFooter = ({
135
+ children,
136
+ className
137
+ }) => {
138
+ return /*#__PURE__*/_jsx(View, {
139
+ className: cn('border-t border-border px-4 py-3 web:px-6', className),
140
+ children: children
141
+ });
142
+ };
143
+ export { BottomSheet, BottomSheetHeader, BottomSheetContent, BottomSheetFooter };
144
+ //# sourceMappingURL=Bottom-Sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","forwardRef","useCallback","useImperativeHandle","useMemo","useRef","StyleSheet","View","BottomSheetPrimitive","BottomSheetBackdrop","BottomSheetView","cn","useTheme","hslToRgb","jsx","_jsx","BottomSheet","children","snapPoints","customSnapPoints","initialSnapIndex","enablePanDownToClose","enableDynamicSizing","backdropOpacity","enableBackdropDismiss","handleIndicatorStyle","backgroundStyle","className","containerClassName","onChange","onClose","ref","bottomSheetRef","colors","open","current","expand","close","collapse","snapToIndex","index","renderBackdrop","props","opacity","appearsOnIndex","disappearsOnIndex","pressBehavior","handleSheetChanges","themedBackgroundStyle","styles","background","backgroundColor","card","themedHandleStyle","handleIndicator","border","backdropComponent","style","container","animateOnMount","contentContainer","displayName","create","zIndex","flex","borderTopLeftRadius","borderTopRightRadius","width","height","BottomSheetHeader","BottomSheetContent","BottomSheetFooter"],"sourceRoot":"../../../../src","sources":["components/ui/Bottom-Sheet.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IACVC,UAAU,EACVC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AACd,SAASC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAC1D,OAAOC,oBAAoB,IACzBC,mBAAmB,EAEnBC,eAAe,QACV,sBAAsB;AAC7B,SAASC,EAAE,QAAQ,oBAAiB;AACpC,SAASC,QAAQ,QAAQ,4BAAyB;AAClD,SAASC,QAAQ,QAAQ,oB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AAEU;AAAkC,CAAC,KAAK;EAC7E,oBACEZ,IAAA,CAACR,IAAI;IACHoB,SAAS,EAAEhB,EAAE,CAAC,2CAA2C,EAAEgB,SAAS,CAAE;IAAAV,QAAA,EAErEA;EAAQ,CACL,CAAC;AAEX,CAAC;AAED,SACED,WAAW,EACXqD,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB","ignoreList":[]}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ import * as Slot from '@rn-primitives/slot';
4
+ import { cva } from 'class-variance-authority';
5
+ import { cssInterop } from 'nativewind';
6
+ import * as React from 'react';
7
+ import { Pressable } from 'react-native';
8
+ import { cn } from "../../lib/utils.js";
9
+ import { TextClassContext } from "./Text.js";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ cssInterop(Pressable, {
12
+ className: 'style'
13
+ });
14
+ cssInterop(Slot.Pressable, {
15
+ className: 'style'
16
+ });
17
+ const buttonVariants = cva('group flex items-center justify-center rounded-4 web:ring-offset-background web:transition-colors web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2', {
18
+ variants: {
19
+ variant: {
20
+ default: 'bg-primary active:opacity-20',
21
+ destructive: 'bg-destructive active:opacity-90',
22
+ outline: 'border border-input bg-background active:bg-accent',
23
+ secondary: 'bg-secondary active:opacity-80',
24
+ ghost: 'active:bg-accent',
25
+ link: 'web:underline-offset-4'
26
+ },
27
+ size: {
28
+ default: 'h-10 px-button-x py-button-y native:h-12 native:px-button-x native:py-button-y',
29
+ sm: 'h-9 px-3',
30
+ lg: 'h-11 px-8 native:h-14',
31
+ icon: 'h-10 w-10'
32
+ }
33
+ },
34
+ defaultVariants: {
35
+ variant: 'default',
36
+ size: 'default'
37
+ }
38
+ });
39
+ const buttonTextVariants = cva('web:whitespace-nowrap text-sm native:text-base font-medium web:transition-colors', {
40
+ variants: {
41
+ variant: {
42
+ default: 'text-primary-foreground',
43
+ destructive: 'text-destructive-foreground',
44
+ outline: 'text-foreground group-active:text-accent-foreground',
45
+ secondary: 'text-secondary-foreground group-active:text-secondary-foreground',
46
+ ghost: 'text-foreground group-active:text-accent-foreground',
47
+ link: 'text-primary group-active:underline'
48
+ },
49
+ size: {
50
+ default: '',
51
+ sm: '',
52
+ lg: 'native:text-lg',
53
+ icon: ''
54
+ }
55
+ },
56
+ defaultVariants: {
57
+ variant: 'default',
58
+ size: 'default'
59
+ }
60
+ });
61
+ const Button = /*#__PURE__*/React.forwardRef(({
62
+ className,
63
+ variant,
64
+ size,
65
+ asChild = false,
66
+ ...props
67
+ }, ref) => {
68
+ const Component = asChild ? Slot.Pressable : Pressable;
69
+ return /*#__PURE__*/_jsx(TextClassContext.Provider, {
70
+ value: cn(buttonTextVariants({
71
+ variant,
72
+ size
73
+ })),
74
+ children: /*#__PURE__*/_jsx(Component, {
75
+ ref: ref,
76
+ role: "button",
77
+ className: cn(buttonVariants({
78
+ variant,
79
+ size,
80
+ className
81
+ }), props.disabled && 'opacity-50 web:pointer-events-none'),
82
+ ...props
83
+ })
84
+ });
85
+ });
86
+ Button.displayName = 'Button';
87
+ export { Button, buttonTextVariants, buttonVariants };
88
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Slot","cva","cssInterop","React","Pressable","cn","TextClassContext","jsx","_jsx","className","buttonVariants","variants","variant","default","destructive","outline","secondary","ghost","link","size","sm","lg","icon","defaultVariants","buttonTextVariants","Button","forwardRef","asChild","props","ref","Component","Provider","value","children","role","disabled","displayName"],"sourceRoot":"../../../../src","sources":["components/ui/Button.tsx"],"mappings":";;AAAA,OAAO,KAAKA,IAAI,MAAM,qBAAqB;AAK3C,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,UAAU,QAAQ,YAAY;AACvC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,EAAE,QAAQ,oBAAiB;AACpC,SAASC,gBAAgB,QAAQ,WA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O,IAAI;EAAEQ,OAAO,GAAG,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAChE,MAAMC,SAAS,GAAGH,OAAO,GAAG3B,IAAI,CAACI,SAAS,GAAGA,SAAS;EAEtD,oBACEI,IAAA,CAACF,gBAAgB,CAACyB,QAAQ;IACxBC,KAAK,EAAE3B,EAAE,CAACmB,kBAAkB,CAAC;MAAEZ,OAAO;MAAEO;IAAK,CAAC,CAAC,CAAE;IAAAc,QAAA,eAEjDzB,IAAA,CAACsB,SAAS;MACRD,GAAG,EAAEA,GAAI;MACTK,IAAI,EAAC,QAAQ;MACbzB,SAAS,EAAEJ,EAAE,CACXK,cAAc,CAAC;QAAEE,OAAO;QAAEO,IAAI;QAAEV;MAAU,CAAC,CAAC,EAC5CmB,KAAK,CAACO,QAAQ,IAAI,oCACpB,CAAE;MAAA,GACEP;IAAK,CACV;EAAC,CACuB,CAAC;AAEhC,CACF,CAAC;AAEDH,MAAM,CAACW,WAAW,GAAG,QAAQ;AAE7B,SAASX,MAAM,EAAED,kBAAkB,EAAEd,cAAc","ignoreList":[]}
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+
3
+ import * as Slot from '@rn-primitives/slot';
4
+ import { cssInterop } from 'nativewind';
5
+ import * as React from 'react';
6
+ import { View } from 'react-native';
7
+ import { cn } from "../../lib/utils.js";
8
+ import { TextClassContext } from "./Text.js";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ cssInterop(View, {
11
+ className: 'style'
12
+ });
13
+ cssInterop(Slot.View, {
14
+ className: 'style'
15
+ });
16
+
17
+ /**
18
+ * Card container component - Main wrapper for card content
19
+ *
20
+ * Provides elevated container with border, rounded corners, and shadow.
21
+ * Use with CardHeader, CardTitle, CardDescription, CardContent, and CardFooter
22
+ * for a complete card structure.
23
+ *
24
+ * @component
25
+ * @example
26
+ * ```tsx
27
+ * <Card>
28
+ * <CardHeader>
29
+ * <CardTitle><Text>Title</Text></CardTitle>
30
+ * <CardDescription><Text>Description</Text></CardDescription>
31
+ * </CardHeader>
32
+ * <CardContent>
33
+ * <Text>Card content goes here</Text>
34
+ * </CardContent>
35
+ * <CardFooter>
36
+ * <Button>Action</Button>
37
+ * </CardFooter>
38
+ * </Card>
39
+ * ```
40
+ *
41
+ * @property {boolean} [asChild] - When true, merges props into immediate child
42
+ * @property {string} [className] - Additional Tailwind classes
43
+ */
44
+ const Card = /*#__PURE__*/React.forwardRef(({
45
+ className,
46
+ asChild = false,
47
+ ...props
48
+ }, ref) => {
49
+ const Component = asChild ? Slot.View : View;
50
+ return /*#__PURE__*/_jsx(Component, {
51
+ className: cn('rounded-lg border border-border dark:border-border bg-card dark:bg-card p-6 shadow-sm shadow-foreground/10 dark:shadow-white/10', className),
52
+ ref: ref,
53
+ ...props
54
+ });
55
+ });
56
+ Card.displayName = 'Card';
57
+
58
+ /**
59
+ * CardHeader - Container for card title and description
60
+ *
61
+ * Provides proper spacing for title and description elements at the top of a card.
62
+ *
63
+ * @property {boolean} [asChild] - When true, merges props into immediate child
64
+ * @property {string} [className] - Additional Tailwind classes
65
+ */
66
+ const CardHeader = /*#__PURE__*/React.forwardRef(({
67
+ className,
68
+ asChild = false,
69
+ ...props
70
+ }, ref) => {
71
+ const Component = asChild ? Slot.View : View;
72
+ return /*#__PURE__*/_jsx(Component, {
73
+ className: cn('flex flex-col gap-1.5 p-6', className),
74
+ ref: ref,
75
+ ...props
76
+ });
77
+ });
78
+ CardHeader.displayName = 'CardHeader';
79
+
80
+ /**
81
+ * CardTitle - Main title text for the card
82
+ *
83
+ * Automatically styles child Text components with large, semibold typography.
84
+ * Uses TextClassContext to apply consistent styling to nested Text elements.
85
+ *
86
+ * @property {boolean} [asChild] - When true, merges props into immediate child
87
+ * @property {string} [className] - Additional Tailwind classes for text styling
88
+ */
89
+ const CardTitle = /*#__PURE__*/React.forwardRef(({
90
+ className,
91
+ asChild = false,
92
+ ...props
93
+ }, ref) => {
94
+ const Component = asChild ? Slot.View : View;
95
+ return /*#__PURE__*/_jsx(TextClassContext.Provider, {
96
+ value: cn('text-2xl font-semibold leading-none tracking-tight text-card-foreground dark:text-card-foreground', className),
97
+ children: /*#__PURE__*/_jsx(Component, {
98
+ ref: ref,
99
+ ...props
100
+ })
101
+ });
102
+ });
103
+ CardTitle.displayName = 'CardTitle';
104
+
105
+ /**
106
+ * CardDescription - Subtitle or description text for the card
107
+ *
108
+ * Automatically styles child Text components with muted, smaller typography.
109
+ * Uses TextClassContext to apply consistent styling to nested Text elements.
110
+ *
111
+ * @property {boolean} [asChild] - When true, merges props into immediate child
112
+ * @property {string} [className] - Additional Tailwind classes for text styling
113
+ */
114
+ const CardDescription = /*#__PURE__*/React.forwardRef(({
115
+ className,
116
+ asChild = false,
117
+ ...props
118
+ }, ref) => {
119
+ const Component = asChild ? Slot.View : View;
120
+ return /*#__PURE__*/_jsx(TextClassContext.Provider, {
121
+ value: cn('text-sm text-muted-foreground dark:text-muted-foreground', className),
122
+ children: /*#__PURE__*/_jsx(Component, {
123
+ ref: ref,
124
+ ...props
125
+ })
126
+ });
127
+ });
128
+ CardDescription.displayName = 'CardDescription';
129
+
130
+ /**
131
+ * CardContent - Main content area of the card
132
+ *
133
+ * Container for the primary card content with appropriate padding.
134
+ * Top padding is removed to flow naturally after CardHeader.
135
+ *
136
+ * @property {boolean} [asChild] - When true, merges props into immediate child
137
+ * @property {string} [className] - Additional Tailwind classes
138
+ */
139
+ const CardContent = /*#__PURE__*/React.forwardRef(({
140
+ className,
141
+ asChild = false,
142
+ ...props
143
+ }, ref) => {
144
+ const Component = asChild ? Slot.View : View;
145
+ return /*#__PURE__*/_jsx(Component, {
146
+ className: cn('p-6 pt-0', className),
147
+ ref: ref,
148
+ ...props
149
+ });
150
+ });
151
+ CardContent.displayName = 'CardContent';
152
+
153
+ /**
154
+ * CardFooter - Footer area for actions or additional info
155
+ *
156
+ * Typically contains buttons or other interactive elements.
157
+ * Arranged as a row with centered items.
158
+ *
159
+ * @property {boolean} [asChild] - When true, merges props into immediate child
160
+ * @property {string} [className] - Additional Tailwind classes
161
+ */
162
+ const CardFooter = /*#__PURE__*/React.forwardRef(({
163
+ className,
164
+ asChild = false,
165
+ ...props
166
+ }, ref) => {
167
+ const Component = asChild ? Slot.View : View;
168
+ return /*#__PURE__*/_jsx(Component, {
169
+ className: cn('flex flex-row items-center p-6 pt-0', className),
170
+ ref: ref,
171
+ ...props
172
+ });
173
+ });
174
+ CardFooter.displayName = 'CardFooter';
175
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
176
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Slot","cssInterop","React","View","cn","TextClassContext","jsx","_jsx","className","Card","forwardRef","asChild","props","ref","Component","displayName","CardHeader","CardTitle","Provider","value","children","CardDescription","CardContent","CardFooter"],"sourceRoot":"../../../../src","sources":["components/ui/Card.tsx"],"mappings":";;AAAA,OAAO,KAAKA,IAAI,MAAM,qBAAqB;AAE3C,SAASC,UAAU,QAAQ,YAAY;AACvC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,EAAE,QAAQ,oBAAiB;AACpC,SAASC,gBAAgB,QAAQ,WAAQ;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1CN,UAAU,CAACE,IAAI,EAAE;EAAEK,SAAS,EAAE;AAAQ,CAAC,CAAC;AACxCP,UAAU,CAACD,IAAI,CAACG,IAAI,EAAE;EAAEK,SAAS,EAAE;AAAQ,CAAC,CAAC;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,IAAI,gBAAGP,KAAK,CAACQ,UAAU,CAG3B,CAAC;EAAEF,SAAS;EAAEG,OAAO,GAAG,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;E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OAAO,GAAGX,IAAI,CAACG,IAAI,GAAGA,IAAI;EAC5C,oBACEI,IAAA,CAACO,SAAS;IACRN,SAAS,EAAEJ,EAAE,CAAC,qCAAqC,EAAEI,SAAS,CAAE;IAChEK,GAAG,EAAEA,GAAW;IAAA,GACZD;EAAK,CACV,CAAC;AAEN,CAAC,CAAC;AACFW,UAAU,CAACR,WAAW,GAAG,YAAY;AAErC,SACEN,IAAI,EACJa,WAAW,EACXD,eAAe,EACfE,UAAU,EACVP,UAAU,EACVC,SAAS","ignoreList":[]}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ import { Icon } from "./Icon.js";
4
+ import { cn } from "../../lib/utils.js";
5
+ import * as CheckboxPrimitive from '@rn-primitives/checkbox';
6
+ import { Check } from 'lucide-react-native';
7
+ import { Platform } from 'react-native';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const DEFAULT_HIT_SLOP = 24;
10
+
11
+ /**
12
+ * Interactive checkbox for boolean selections
13
+ *
14
+ * A control that allows users to toggle between checked and unchecked states.
15
+ * Features a checkmark indicator, configurable styling, and accessible touch targets.
16
+ *
17
+ * @component
18
+ * @example
19
+ * ```tsx
20
+ * // Basic checkbox
21
+ * <Checkbox checked={isChecked} onCheckedChange={setIsChecked} />
22
+ *
23
+ * // Checkbox with label
24
+ * <View className="flex-row items-center gap-2">
25
+ * <Checkbox id="terms" checked={accepted} onCheckedChange={setAccepted} />
26
+ * <Label htmlFor="terms">Accept terms and conditions</Label>
27
+ * </View>
28
+ *
29
+ * // Disabled checkbox
30
+ * <Checkbox checked={true} disabled />
31
+ * ```
32
+ *
33
+ * @accessibility
34
+ * - Uses 24px hit slop for easier touch interaction
35
+ * - Supports keyboard navigation on web
36
+ * - Proper ARIA attributes for screen readers
37
+ * - Visual focus indicators on web
38
+ */
39
+ function Checkbox({
40
+ className,
41
+ checkedClassName,
42
+ indicatorClassName,
43
+ iconClassName,
44
+ ...props
45
+ }) {
46
+ return /*#__PURE__*/_jsx(CheckboxPrimitive.Root, {
47
+ className: cn('border-input dark:bg-input/30 size-4 shrink-0 rounded-[4px] border shadow-sm shadow-black/5', Platform.select({
48
+ web: 'focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive peer cursor-default outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed',
49
+ native: 'overflow-hidden'
50
+ }), props.checked && cn('border-primary', checkedClassName), props.disabled && 'opacity-50', className),
51
+ hitSlop: DEFAULT_HIT_SLOP,
52
+ ...props,
53
+ children: /*#__PURE__*/_jsx(CheckboxPrimitive.Indicator, {
54
+ className: cn('bg-primary h-full w-full items-center justify-center', indicatorClassName),
55
+ children: /*#__PURE__*/_jsx(Icon, {
56
+ as: Check,
57
+ size: 12,
58
+ strokeWidth: Platform.OS === 'web' ? 2.5 : 3.5,
59
+ className: cn('text-primary-foreground', iconClassName)
60
+ })
61
+ })
62
+ });
63
+ }
64
+ export { Checkbox };
65
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Icon","cn","CheckboxPrimitive","Check","Platform","jsx","_jsx","DEFAULT_HIT_SLOP","Checkbox","className","checkedClassName","indicatorClassName","iconClassName","props","Root","select","web","native","checked","disabled","hitSlop","children","Indicator","as","size","strokeWidth","OS"],"sourceRoot":"../../../../src","sources":["components/ui/Checkbox.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,WAAQ;AAC7B,SAASC,EAAE,QAAQ,oBAAiB;AACpC,OAAO,KAAKC,iBAAiB,MAAM,yBAAyB;AAC5D,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,QAAQ,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExC,MAAMC,gBAAgB,GAAG,EAAE;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,QAAQA,CAAC;EAChBC,SAAS;EACTC,gBAAgB;EAChBC,kBAAkB;EAClBC,aAAa;EACb,GAAGC;AAMH,CAAC,EAAE;EACH,oBACEP,IAAA,CAACJ,iBAAiB,CAACY,IAAI;IACrBL,SAAS,EAAER,EAAE,CACX,6FAA6F,EAC7FG,QAAQ,CAACW,MAAM,CAAC;MACdC,GAAG,EAAE,qQAAqQ;MAC1QC,MAAM,EAAE;IACV,CAAC,CAAC,EACFJ,KAAK,CAACK,OAAO,IAAIjB,EAAE,CAAC,gBAAgB,EAAES,gBAAgB,CAAC,EACvDG,KAAK,CAACM,QAAQ,IAAI,YAAY,EAC9BV,SACF,CAAE;IACFW,OAAO,EAAEb,gBAAiB;IAAA,GACtBM,KAAK;IAAAQ,QAAA,eAETf,IAAA,CAACJ,iBAAiB,CAACoB,SAAS;MAC1Bb,SAAS,EAAER,EAAE,CACX,sDAAsD,EACtDU,kBACF,CAAE;MAAAU,QAAA,eAEFf,IAAA,CAACN,IAAI;QACHuB,EAAE,EAAEpB,KAAM;QACVqB,IAAI,EAAE,EAAG;QACTC,WAAW,EAAErB,QAAQ,CAACsB,EAAE,KAAK,KAAK,GAAG,GAAG,GAAG,GAAI;QAC/CjB,SAAS,EAAER,EAAE,CAAC,yBAAyB,EAAEW,aAAa;MAAE,CACzD;IAAC,CACyB;EAAC,CACR,CAAC;AAE7B;AAEA,SAASJ,QAAQ","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ import * as CollapsiblePrimitive from '@rn-primitives/collapsible';
4
+
5
+ /**
6
+ * Root collapsible container
7
+ *
8
+ * An interactive component that can show and hide content. Unlike Accordion, it doesn't enforce
9
+ * any specific visual styling, making it more flexible for custom layouts.
10
+ *
11
+ * @component
12
+ * @example
13
+ * ```tsx
14
+ * <Collapsible open={isOpen} onOpenChange={setIsOpen}>
15
+ * <CollapsibleTrigger asChild>
16
+ * <Button variant="ghost"><Text>Toggle</Text></Button>
17
+ * </CollapsibleTrigger>
18
+ * <CollapsibleContent>
19
+ * <Text>This content can be shown or hidden</Text>
20
+ * </CollapsibleContent>
21
+ * </Collapsible>
22
+ * ```
23
+ */
24
+ const Collapsible = CollapsiblePrimitive.Root;
25
+
26
+ /**
27
+ * Trigger button that toggles collapsible content visibility
28
+ *
29
+ * @component
30
+ */
31
+ const CollapsibleTrigger = CollapsiblePrimitive.Trigger;
32
+
33
+ /**
34
+ * Collapsible content container
35
+ *
36
+ * Automatically animates height when expanding or collapsing.
37
+ *
38
+ * @component
39
+ */
40
+ const CollapsibleContent = CollapsiblePrimitive.Content;
41
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
42
+ //# sourceMappingURL=Collapsible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CollapsiblePrimitive","Collapsible","Root","CollapsibleTrigger","Trigger","CollapsibleContent","Content"],"sourceRoot":"../../../../src","sources":["components/ui/Collapsible.tsx"],"mappings":";;AAAA,OAAO,KAAKA,oBAAoB,MAAM,4BAA4B;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GAAGD,oBAAoB,CAACE,IAAI;;AAE7C;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAGH,oBAAoB,CAACI,OAAO;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAGL,oBAAoB,CAACM,OAAO;AAEvD,SAASL,WAAW,EAAEE,kBAAkB,EAAEE,kBAAkB","ignoreList":[]}