@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,74 @@
1
+ "use strict";
2
+
3
+ import { cn } from "../../lib/utils.js";
4
+ import { Platform, TextInput } from 'react-native';
5
+ import { cssInterop } from 'nativewind';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ cssInterop(TextInput, {
8
+ className: 'style'
9
+ });
10
+
11
+ /**
12
+ * Props for Input component
13
+ *
14
+ * @extends TextInputProps - All standard React Native TextInput props
15
+ * @property {string} [className] - Additional Tailwind classes for custom styling
16
+ * @property {boolean} [editable=true] - Whether the input is editable (disabled when false)
17
+ */
18
+
19
+ /**
20
+ * A styled text input component with consistent design across platforms
21
+ *
22
+ * Features platform-specific behaviors:
23
+ * - Web: Focus ring, selection styling, aria-invalid support
24
+ * - Native: Optimized placeholder opacity and input styling
25
+ *
26
+ * Automatically adapts styling when disabled/non-editable.
27
+ *
28
+ * @component
29
+ * @example
30
+ * ```tsx
31
+ * // Basic input
32
+ * <Input
33
+ * placeholder="Enter your name"
34
+ * value={name}
35
+ * onChangeText={setName}
36
+ * />
37
+ *
38
+ * // Disabled input
39
+ * <Input
40
+ * value="Read only"
41
+ * editable={false}
42
+ * />
43
+ *
44
+ * // With custom styling
45
+ * <Input
46
+ * className="border-primary"
47
+ * placeholder="Search..."
48
+ * />
49
+ * ```
50
+ *
51
+ * @accessibility
52
+ * - Supports aria-invalid for form validation states (web)
53
+ * - Placeholder text uses appropriate contrast colors
54
+ * - Disabled state is visually indicated with opacity
55
+ */
56
+ function Input({
57
+ className,
58
+ editable = true,
59
+ ...props
60
+ }) {
61
+ return /*#__PURE__*/_jsx(TextInput, {
62
+ className: cn('bg-background dark:bg-background border-input dark:border-input text-foreground dark:text-foreground flex h-10 w-full min-w-0 flex-row items-center rounded-md border px-3 py-1 text-base leading-5 shadow-sm shadow-black/5 dark:shadow-white/5 sm:h-9', !editable && cn('opacity-50', Platform.select({
63
+ web: 'disabled:pointer-events-none disabled:cursor-not-allowed'
64
+ })), Platform.select({
65
+ web: cn('placeholder:text-muted-foreground dark:placeholder:text-muted-foreground selection:bg-primary dark:selection:bg-primary selection:text-primary-foreground dark:selection:text-primary-foreground outline-none transition-[color,box-shadow] md:text-sm', 'focus-visible:border-ring dark:focus-visible:border-ring focus-visible:ring-ring/50 dark:focus-visible:ring-ring/50 focus-visible:ring-[3px]', 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive'),
66
+ native: 'placeholder:text-muted-foreground/50 dark:placeholder:text-muted-foreground/50'
67
+ }), className),
68
+ placeholderTextColor: undefined,
69
+ editable: editable,
70
+ ...props
71
+ });
72
+ }
73
+ export { Input };
74
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["cn","Platform","TextInput","cssInterop","jsx","_jsx","className","Input","editable","props","select","web","native","placeholderTextColor","undefined"],"sourceRoot":"../../../../src","sources":["components/ui/Input.tsx"],"mappings":";;AAAA,SAASA,EAAE,QAAQ,oBAAiB;AACpC,SAASC,QAAQ,EAAEC,SAAS,QAA6B,cAAc;AACvE,SAASC,UAAU,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExCF,UAAU,CAACD,SAAS,EAAE;EAAEI,SAAS,EAAE;AAAQ,CAAC,CAAC;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,KAAKA,CAAC;EACbD,SAAS;EACTE,QAAQ,GAAG,IAAI;EACf,GAAGC;AACwC,CAAC,EAAE;EAC9C,oBACEJ,IAAA,CAACH,SAAS;IACRI,SAAS,EAAEN,EAAE,CACX,yPAAyP,EACzP,CAACQ,QAAQ,IACPR,EAAE,CACA,YAAY,EACZC,QAAQ,CAACS,MAAM,CAAC;MACdC,GAAG,EAAE;IACP,CAAC,CACH,CAAC,EACHV,QAAQ,CAACS,MAAM,CAAC;MACdC,GAAG,EAAEX,EAAE,CACL,wPAAwP,EACxP,8IAA8I,EAC9I,6IACF,CAAC;MACDY,MAAM,EACJ;IACJ,CAAC,CAAC,EACFN,SACF,CAAE;IACFO,oBAAoB,EAAEC,SAAU;IAChCN,QAAQ,EAAEA,QAAS;IAAA,GACfC;EAAK,CACV,CAAC;AAEN;AAEA,SAASF,KAAK","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { cn } from "../../lib/utils.js";
5
+ import { Text } from "./Text.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ /**
8
+ * Accessible label component for form controls
9
+ *
10
+ * Provides semantic labeling for form inputs with proper styling and accessibility support.
11
+ * Automatically associates with form controls and respects disabled states.
12
+ *
13
+ * @component
14
+ * @example
15
+ * ```tsx
16
+ * // Label with input
17
+ * <View className="gap-2">
18
+ * <Label htmlFor="email">Email Address</Label>
19
+ * <Input id="email" placeholder="Enter email" />
20
+ * </View>
21
+ *
22
+ * // Label for checkbox
23
+ * <View className="flex-row items-center gap-2">
24
+ * <Checkbox id="terms" />
25
+ * <Label htmlFor="terms">I agree to the terms and conditions</Label>
26
+ * </View>
27
+ * ```
28
+ *
29
+ * @accessibility
30
+ * - Properly associates with form controls via htmlFor/id
31
+ * - Reduced opacity when associated control is disabled
32
+ * - Screen reader compatible
33
+ */
34
+ const Label = /*#__PURE__*/React.forwardRef(({
35
+ className,
36
+ ...props
37
+ }, ref) => /*#__PURE__*/_jsx(Text, {
38
+ className: cn('text-sm native:text-base font-medium leading-none text-foreground dark:text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70', className),
39
+ ref: ref,
40
+ ...props
41
+ }));
42
+ Label.displayName = 'Label';
43
+ export { Label };
44
+ //# sourceMappingURL=Label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","cn","Text","jsx","_jsx","Label","forwardRef","className","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/ui/Label.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,EAAE,QAAQ,oBAAiB;AACpC,SAASC,IAAI,QAAQ,WAAQ;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG9B;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,KAAK,gBAAGL,KAAK,CAACM,UAAU,CAG5B,CAAC;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,kBAC7BL,IAAA,CAACF,IAAI;EACHK,SAAS,EAAEN,EAAE,CACX,kJAAkJ,EAClJM,SACF,CAAE;EACFE,GAAG,EAAEA,GAAI;EAAA,GACLD;AAAK,CACV,CACF,CAAC;AACFH,KAAK,CAACK,WAAW,GAAG,OAAO;AAE3B,SAASL,KAAK","ignoreList":[]}
@@ -0,0 +1,375 @@
1
+ "use strict";
2
+
3
+ import { Icon } from "./Icon.js";
4
+ import { NativeOnlyAnimatedView } from "./Native-Only-Animated-View.js";
5
+ import { TextClassContext } from "./Text.js";
6
+ import { cn } from "../../lib/utils.js";
7
+ import * as MenubarPrimitive from '@rn-primitives/menubar';
8
+ import { Portal } from '@rn-primitives/portal';
9
+ import { Check, ChevronDown, ChevronRight, ChevronUp } from 'lucide-react-native';
10
+ import * as React from 'react';
11
+ import { Platform, Pressable, StyleSheet, Text, View } from 'react-native';
12
+ import { cssInterop } from 'nativewind';
13
+ import { FadeIn } from 'react-native-reanimated';
14
+ import { FullWindowOverlay as RNFullWindowOverlay } from 'react-native-screens';
15
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
+ cssInterop(View, {
17
+ className: 'style'
18
+ });
19
+ cssInterop(Text, {
20
+ className: 'style'
21
+ });
22
+ cssInterop(Pressable, {
23
+ className: 'style'
24
+ });
25
+
26
+ /**
27
+ * Individual menu within the menubar
28
+ *
29
+ * @component
30
+ */
31
+ const MenubarMenu = MenubarPrimitive.Menu;
32
+
33
+ /**
34
+ * Groups related menu items together
35
+ *
36
+ * @component
37
+ */
38
+ const MenubarGroup = MenubarPrimitive.Group;
39
+
40
+ /**
41
+ * Portal component to render menu content outside the DOM hierarchy
42
+ *
43
+ * @component
44
+ */
45
+ const MenubarPortal = MenubarPrimitive.Portal;
46
+
47
+ /**
48
+ * Root component for nested submenu
49
+ *
50
+ * @component
51
+ */
52
+ const MenubarSub = MenubarPrimitive.Sub;
53
+
54
+ /**
55
+ * Groups radio items together with single selection
56
+ *
57
+ * @component
58
+ */
59
+ const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
60
+
61
+ /**
62
+ * Full window overlay wrapper for iOS, Fragment for other platforms
63
+ */
64
+ const FullWindowOverlay = Platform.OS === 'ios' ? RNFullWindowOverlay : React.Fragment;
65
+
66
+ /**
67
+ * Root menubar component for application-level menu navigation
68
+ *
69
+ * Provides horizontal menu bar similar to desktop applications, with support
70
+ * for nested menus and automatic close on outside press.
71
+ *
72
+ * @component
73
+ * @example
74
+ * ```tsx
75
+ * <Menubar>
76
+ * <MenubarMenu>
77
+ * <MenubarTrigger>
78
+ * <Text>File</Text>
79
+ * </MenubarTrigger>
80
+ * <MenubarContent>
81
+ * <MenubarItem>
82
+ * <Text>New File</Text>
83
+ * </MenubarItem>
84
+ * <MenubarItem>
85
+ * <Text>Open</Text>
86
+ * </MenubarItem>
87
+ * </MenubarContent>
88
+ * </MenubarMenu>
89
+ * </Menubar>
90
+ * ```
91
+ *
92
+ * @accessibility
93
+ * - Keyboard navigation support
94
+ * - Proper ARIA attributes for menu structure
95
+ */
96
+ function Menubar({
97
+ className,
98
+ value: valueProp,
99
+ onValueChange: onValueChangeProp,
100
+ ...props
101
+ }) {
102
+ const id = React.useId();
103
+ const [value, setValue] = React.useState(undefined);
104
+ function closeMenu() {
105
+ if (onValueChangeProp) {
106
+ onValueChangeProp(undefined);
107
+ return;
108
+ }
109
+ setValue(undefined);
110
+ }
111
+ return /*#__PURE__*/_jsxs(_Fragment, {
112
+ children: [Platform.OS !== 'web' && (value || valueProp) ? /*#__PURE__*/_jsx(Portal, {
113
+ name: `menubar-overlay-${id}`,
114
+ children: /*#__PURE__*/_jsx(Pressable, {
115
+ onPress: closeMenu,
116
+ style: StyleSheet.absoluteFill
117
+ })
118
+ }) : null, /*#__PURE__*/_jsx(MenubarPrimitive.Root, {
119
+ className: cn('bg-background border-border flex h-10 flex-row items-center gap-1 rounded-md border p-1 shadow-sm shadow-black/5 sm:h-9', className),
120
+ value: value ?? valueProp,
121
+ onValueChange: onValueChangeProp ?? setValue,
122
+ ...props
123
+ })]
124
+ });
125
+ }
126
+
127
+ /**
128
+ * Trigger button for a menubar menu
129
+ *
130
+ * @component
131
+ * @example
132
+ * ```tsx
133
+ * <MenubarTrigger>
134
+ * <Text>Edit</Text>
135
+ * </MenubarTrigger>
136
+ * ```
137
+ */
138
+ function MenubarTrigger({
139
+ className,
140
+ ...props
141
+ }) {
142
+ const {
143
+ value
144
+ } = MenubarPrimitive.useRootContext();
145
+ const {
146
+ value: itemValue
147
+ } = MenubarPrimitive.useMenuContext();
148
+ return /*#__PURE__*/_jsx(TextClassContext.Provider, {
149
+ value: cn('text-sm font-medium select-none group-active:text-accent-foreground', value === itemValue && 'text-accent-foreground'),
150
+ children: /*#__PURE__*/_jsx(MenubarPrimitive.Trigger, {
151
+ className: cn('group flex items-center rounded-md px-2 py-1.5 sm:py-1', Platform.select({
152
+ web: 'focus:bg-accent focus:text-accent-foreground cursor-default outline-none'
153
+ }), value === itemValue && 'bg-accent', className),
154
+ ...props
155
+ })
156
+ });
157
+ }
158
+
159
+ /**
160
+ * Trigger for opening a nested submenu
161
+ * @component
162
+ */
163
+ function MenubarSubTrigger({
164
+ className: _className,
165
+ inset,
166
+ children,
167
+ iconClassName,
168
+ ...props
169
+ }) {
170
+ const {
171
+ open
172
+ } = MenubarPrimitive.useSubContext();
173
+ const icon = Platform.OS === 'web' ? ChevronRight : open ? ChevronUp : ChevronDown;
174
+ return /*#__PURE__*/_jsx(TextClassContext.Provider, {
175
+ value: cn('text-sm select-none group-active:text-accent-foreground', open && 'text-accent-foreground'),
176
+ children: /*#__PURE__*/_jsxs(MenubarPrimitive.SubTrigger, {
177
+ className: cn('active:bg-accent group flex flex-row items-center rounded-sm px-2 py-2 sm:py-1.5', Platform.select({
178
+ web: 'focus:bg-accent focus:text-accent-foreground cursor-default outline-none [&_svg]:pointer-events-none'
179
+ }), open && 'bg-accent', inset && 'pl-8'),
180
+ ...props,
181
+ children: [/*#__PURE__*/_jsx(_Fragment, {
182
+ children: children
183
+ }), /*#__PURE__*/_jsx(Icon, {
184
+ as: icon,
185
+ className: cn('text-foreground ml-auto size-4 shrink-0', iconClassName)
186
+ })]
187
+ })
188
+ });
189
+ }
190
+
191
+ /**
192
+ * Content container for nested submenu items
193
+ * @component
194
+ */
195
+ function MenubarSubContent({
196
+ className,
197
+ ...props
198
+ }) {
199
+ return /*#__PURE__*/_jsx(NativeOnlyAnimatedView, {
200
+ entering: FadeIn,
201
+ children: /*#__PURE__*/_jsx(MenubarPrimitive.SubContent, {
202
+ className: cn('bg-popover border-border overflow-hidden rounded-md border p-1 shadow-lg shadow-black/5', Platform.select({
203
+ web: 'animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fade-in-0 data-[state=closed]:zoom-out-95 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-context-menu-content-transform-origin) z-50 min-w-[8rem]'
204
+ }), className),
205
+ ...props
206
+ })
207
+ });
208
+ }
209
+
210
+ /**
211
+ * Main content container for menu items
212
+ * @component
213
+ */
214
+ function MenubarContent({
215
+ className,
216
+ overlayClassName: _overlayClassName,
217
+ overlayStyle: _overlayStyle,
218
+ portalHost,
219
+ align = 'start',
220
+ alignOffset = -4,
221
+ sideOffset = 8,
222
+ ...props
223
+ }) {
224
+ return /*#__PURE__*/_jsx(MenubarPrimitive.Portal, {
225
+ hostName: portalHost,
226
+ children: /*#__PURE__*/_jsx(FullWindowOverlay, {
227
+ children: /*#__PURE__*/_jsx(NativeOnlyAnimatedView, {
228
+ entering: FadeIn,
229
+ style: StyleSheet.absoluteFill,
230
+ pointerEvents: "box-none",
231
+ children: /*#__PURE__*/_jsx(TextClassContext.Provider, {
232
+ value: "text-popover-foreground",
233
+ children: /*#__PURE__*/_jsx(MenubarPrimitive.Content, {
234
+ className: cn('bg-popover border-border min-w-[12rem] overflow-hidden rounded-md border p-1 shadow-lg shadow-black/5', Platform.select({
235
+ web: cn('animate-in fade-in-0 zoom-in-95 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) z-50 cursor-default', props.side === 'bottom' && 'slide-in-from-top-2', props.side === 'top' && 'slide-in-from-bottom-2')
236
+ }), className),
237
+ align: align,
238
+ alignOffset: alignOffset,
239
+ sideOffset: sideOffset,
240
+ ...props
241
+ })
242
+ })
243
+ })
244
+ })
245
+ });
246
+ }
247
+
248
+ /**
249
+ * Individual menu item component
250
+ * @component
251
+ */
252
+ function MenubarItem({
253
+ className,
254
+ inset,
255
+ variant,
256
+ ...props
257
+ }) {
258
+ return /*#__PURE__*/_jsx(TextClassContext.Provider, {
259
+ value: cn('select-none text-sm text-popover-foreground group-active:text-popover-foreground', variant === 'destructive' && 'text-destructive group-active:text-destructive'),
260
+ children: /*#__PURE__*/_jsx(MenubarPrimitive.Item, {
261
+ className: cn('active:bg-accent group relative flex flex-row items-center gap-2 rounded-sm px-2 py-2 sm:py-1.5', Platform.select({
262
+ web: cn('focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none', variant === 'destructive' && 'focus:bg-destructive/10 dark:focus:bg-destructive/20')
263
+ }), variant === 'destructive' && 'active:bg-destructive/10 dark:active:bg-destructive/20', props.disabled && 'opacity-50', inset && 'pl-8', className),
264
+ ...props
265
+ })
266
+ });
267
+ }
268
+
269
+ /**
270
+ * Menu item with checkbox for multi-selection
271
+ * @component
272
+ */
273
+ function MenubarCheckboxItem({
274
+ className,
275
+ children,
276
+ ...props
277
+ }) {
278
+ return /*#__PURE__*/_jsx(TextClassContext.Provider, {
279
+ value: "text-sm text-popover-foreground select-none group-active:text-accent-foreground",
280
+ children: /*#__PURE__*/_jsxs(MenubarPrimitive.CheckboxItem, {
281
+ className: cn('active:bg-accent group relative flex flex-row items-center gap-2 rounded-sm py-2 pl-8 pr-2 sm:py-1.5', Platform.select({
282
+ web: 'focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none'
283
+ }), props.disabled && 'opacity-50', className),
284
+ ...props,
285
+ children: [/*#__PURE__*/_jsx(View, {
286
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
287
+ children: /*#__PURE__*/_jsx(MenubarPrimitive.ItemIndicator, {
288
+ children: /*#__PURE__*/_jsx(Icon, {
289
+ as: Check,
290
+ className: cn('text-foreground size-4', Platform.select({
291
+ web: 'pointer-events-none'
292
+ }))
293
+ })
294
+ })
295
+ }), /*#__PURE__*/_jsx(_Fragment, {
296
+ children: children
297
+ })]
298
+ })
299
+ });
300
+ }
301
+
302
+ /**
303
+ * Menu item with radio button for single selection within a group
304
+ * @component
305
+ */
306
+ function MenubarRadioItem({
307
+ className,
308
+ children,
309
+ ...props
310
+ }) {
311
+ return /*#__PURE__*/_jsx(TextClassContext.Provider, {
312
+ value: "text-sm text-popover-foreground select-none group-active:text-accent-foreground",
313
+ children: /*#__PURE__*/_jsxs(MenubarPrimitive.RadioItem, {
314
+ className: cn('active:bg-accent group relative flex flex-row items-center gap-2 rounded-sm py-2 pl-8 pr-2 sm:py-1.5', Platform.select({
315
+ web: 'focus:bg-accent focus:text-accent-foreground cursor-default outline-none data-[disabled]:pointer-events-none'
316
+ }), props.disabled && 'opacity-50', className),
317
+ ...props,
318
+ children: [/*#__PURE__*/_jsx(View, {
319
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
320
+ children: /*#__PURE__*/_jsx(MenubarPrimitive.ItemIndicator, {
321
+ children: /*#__PURE__*/_jsx(View, {
322
+ className: "bg-foreground h-2 w-2 rounded-full"
323
+ })
324
+ })
325
+ }), /*#__PURE__*/_jsx(_Fragment, {
326
+ children: children
327
+ })]
328
+ })
329
+ });
330
+ }
331
+
332
+ /**
333
+ * Label component for grouping and describing menu sections
334
+ * @component
335
+ */
336
+ function MenubarLabel({
337
+ className,
338
+ inset,
339
+ ...props
340
+ }) {
341
+ return /*#__PURE__*/_jsx(MenubarPrimitive.Label, {
342
+ className: cn('text-foreground px-2 py-2 text-sm font-medium sm:py-1.5', inset && 'pl-8', className),
343
+ ...props
344
+ });
345
+ }
346
+
347
+ /**
348
+ * Visual separator between menu items or sections
349
+ * @component
350
+ */
351
+ function MenubarSeparator({
352
+ className,
353
+ ...props
354
+ }) {
355
+ return /*#__PURE__*/_jsx(MenubarPrimitive.Separator, {
356
+ className: cn('bg-border -mx-1 my-1 h-px', className),
357
+ ...props
358
+ });
359
+ }
360
+
361
+ /**
362
+ * Displays keyboard shortcut hint for menu items
363
+ * @component
364
+ */
365
+ function MenubarShortcut({
366
+ className,
367
+ ...props
368
+ }) {
369
+ return /*#__PURE__*/_jsx(Text, {
370
+ className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className),
371
+ ...props
372
+ });
373
+ }
374
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
375
+ //# sourceMappingURL=Menubar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Icon","NativeOnlyAnimatedView","TextClassContext","cn","MenubarPrimitive","Portal","Check","ChevronDown","ChevronRight","ChevronUp","React","Platform","Pressable","StyleSheet","Text","View","cssInterop","FadeIn","FullWindowOverlay","RNFullWindowOverlay","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","className","MenubarMenu","Menu","MenubarGroup","Group","MenubarPortal","MenubarSub","Sub","MenubarRadioGroup","RadioGroup","OS","Menubar","value","valueProp","onValueChange","onValueChangeProp","props","id","useId","setValue","useState","undefined","closeMenu","children","name","onPress","style","absoluteFill","Root","MenubarTrigger","useRootContext","itemValue","useMenuContext","Provider","Trigger","select","web","MenubarSubTrigger","_className","inset","iconClassName","open","useSubContext","icon","SubTrigger","as","MenubarSubContent","entering","SubContent","MenubarContent","overlayClassName","_overlayClassName","overlayStyle","_overlayStyle","portalHost","align","alignOffset","sideOffset","hostName","pointerEvents","Content","side","MenubarItem","variant","Item","disabled","MenubarCheckboxItem","CheckboxItem","ItemIndicator","MenubarRadioItem","RadioItem","MenubarLabel","Label","MenubarSeparator","Separator","MenubarShortcut"],"sourceRoot":"../../../../src","sources":["components/ui/Menubar.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,WAAQ;AAC7B,SAASC,sBAAsB,QAAQ,gCAA6B;AACpE,SAASC,gBAAgB,QAAQ,WAAQ;AACzC,SAASC,EAAE,QAAQ,oBAAiB;AACpC,OAAO,KAAKC,gBAAgB,MAAM,wBAAwB;AAC1D,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SACEC,KAAK,EACLC,WAAW,EACXC,YAAY,EACZC,SAAS,QACJ,qBAAqB;AAC5B,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,SAAS,EAETC,UAAU,EACVC,IAAI,EAEJC,IAAI,QAEC,cAAc;AACrB,SAASC,UAAU,QAAQ,YAAY;AACvC,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,iBAAiB,IAAIC,mBAAmB,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhFT,UAAU,CAACD,IAAI,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ErB,IAAA,CAACjB,gBAAgB,CAAC8F,KAAK;IACrBxE,SAAS,EAAEvB,EAAE,CACX,yDAAyD,EACzD8D,KAAK,IAAI,MAAM,EACfvC,SACF,CAAE;IAAA,GACEgB;EAAK,CACV,CAAC;AAEN;;AAEA;AACA;AACA;AACA;AACA,SAASyD,gBAAgBA,CAAC;EACxBzE,SAAS;EACT,GAAGgB;AAE8C,CAAC,EAAE;EACpD,oBACErB,IAAA,CAACjB,gBAAgB,CAACgG,SAAS;IACzB1E,SAAS,EAAEvB,EAAE,CAAC,2BAA2B,EAAEuB,SAAS,CAAE;IAAA,GAClDgB;EAAK,CACV,CAAC;AAEN;;AAEA;AACA;AACA;AACA;AACA,SAAS2D,eAAeA,CAAC;EACvB3E,SAAS;EACT,GAAGgB;AACkC,CAAC,EAAE;EACxC,oBACErB,IAAA,CAACP,IAAI;IACHY,SAAS,EAAEvB,EAAE,CACX,uDAAuD,EACvDuB,SACF,CAAE;IAAA,GACEgB;EAAK,CACV,CAAC;AAEN;AAEA,SACEL,OAAO,EACPuD,mBAAmB,EACnBjB,cAAc,EACd9C,YAAY,EACZ2D,WAAW,EACXS,YAAY,EACZtE,WAAW,EACXI,aAAa,EACbG,iBAAiB,EACjB6D,gBAAgB,EAChBI,gBAAgB,EAChBE,eAAe,EACfrE,UAAU,EACVwC,iBAAiB,EACjBT,iBAAiB,EACjBR,cAAc","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ import { Platform } from 'react-native';
4
+ import Animated from 'react-native-reanimated';
5
+
6
+ /**
7
+ * Platform-conditional animated view component
8
+ *
9
+ * Renders an Animated.View on native platforms (iOS/Android) and a React Fragment
10
+ * on web. This utility helps maintain consistent animation APIs across platforms
11
+ * while avoiding web-incompatible animations.
12
+ *
13
+ * Used internally by other components like Dialog, Popover, Tooltip, etc. to provide
14
+ * smooth entrance/exit animations on native while gracefully degrading to no animation
15
+ * on web where certain Reanimated features are not supported.
16
+ *
17
+ * @component
18
+ * @example
19
+ * ```tsx
20
+ * <NativeOnlyAnimatedView entering={FadeIn} exiting={FadeOut}>
21
+ * <View><Text>Animated content on native, static on web</Text></View>
22
+ * </NativeOnlyAnimatedView>
23
+ * ```
24
+ *
25
+ * @platform iOS, Android - Full animation support
26
+ * @platform web - Renders as Fragment without animations
27
+ */
28
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
29
+ function NativeOnlyAnimatedView(props) {
30
+ if (Platform.OS === 'web') {
31
+ return /*#__PURE__*/_jsx(_Fragment, {
32
+ children: props.children
33
+ });
34
+ } else {
35
+ return /*#__PURE__*/_jsx(Animated.View, {
36
+ ...props
37
+ });
38
+ }
39
+ }
40
+ export { NativeOnlyAnimatedView };
41
+ //# sourceMappingURL=Native-Only-Animated-View.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","Animated","Fragment","_Fragment","jsx","_jsx","NativeOnlyAnimatedView","props","OS","children","View"],"sourceRoot":"../../../../src","sources":["components/ui/Native-Only-Animated-View.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,QAAQ,MAAM,yBAAyB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AArBA,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAsBA,SAASC,sBAAsBA,CAC7BC,KACoC,EACpC;EACA,IAAIP,QAAQ,CAACQ,EAAE,KAAK,KAAK,EAAE;IACzB,oBAAOH,IAAA,CAAAF,SAAA;MAAAM,QAAA,EAAGF,KAAK,CAACE;IAAQ,CAAsB,CAAC;EACjD,CAAC,MAAM;IACL,oBAAOJ,IAAA,CAACJ,QAAQ,CAACS,IAAI;MAAA,GAAKH;IAAK,CAAG,CAAC;EACrC;AACF;AAEA,SAASD,sBAAsB","ignoreList":[]}