@teardown/cli 1.2.38 → 2.0.41

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 (182) hide show
  1. package/bin/teardown.js +11 -1
  2. package/package.json +77 -57
  3. package/src/cli/commands/init.ts +254 -0
  4. package/src/cli/commands/plugins.ts +93 -0
  5. package/src/cli/commands/prebuild.ts +168 -0
  6. package/src/cli/commands/run.ts +727 -0
  7. package/src/cli/commands/start.ts +87 -0
  8. package/src/cli/commands/validate.ts +62 -0
  9. package/src/cli/index.ts +59 -0
  10. package/src/config/index.ts +45 -0
  11. package/src/config/loader.ts +366 -0
  12. package/src/config/schema.ts +235 -0
  13. package/src/config/types.ts +322 -0
  14. package/src/index.ts +177 -0
  15. package/src/pipeline/cache.ts +179 -0
  16. package/src/pipeline/index.ts +10 -0
  17. package/src/pipeline/stages.ts +692 -0
  18. package/src/plugins/base.ts +370 -0
  19. package/src/plugins/capabilities/biometrics.ts +64 -0
  20. package/src/plugins/capabilities/bluetooth.ts +86 -0
  21. package/src/plugins/capabilities/calendar.ts +57 -0
  22. package/src/plugins/capabilities/camera.ts +77 -0
  23. package/src/plugins/capabilities/contacts.ts +57 -0
  24. package/src/plugins/capabilities/deep-linking.ts +124 -0
  25. package/src/plugins/capabilities/firebase.ts +138 -0
  26. package/src/plugins/capabilities/index.ts +96 -0
  27. package/src/plugins/capabilities/location.ts +87 -0
  28. package/src/plugins/capabilities/photo-library.ts +80 -0
  29. package/src/plugins/capabilities/push-notifications.ts +98 -0
  30. package/src/plugins/capabilities/sign-in-with-apple.ts +53 -0
  31. package/src/plugins/context.ts +220 -0
  32. package/src/plugins/index.ts +26 -0
  33. package/src/plugins/resolver.ts +321 -0
  34. package/src/templates/generator.ts +507 -0
  35. package/src/templates/index.ts +9 -0
  36. package/src/templates/paths.ts +25 -0
  37. package/src/transformers/android/gradle.ts +400 -0
  38. package/src/transformers/android/index.ts +19 -0
  39. package/src/transformers/android/manifest.ts +506 -0
  40. package/src/transformers/index.ts +39 -0
  41. package/src/transformers/ios/entitlements.ts +283 -0
  42. package/src/transformers/ios/index.ts +10 -0
  43. package/src/transformers/ios/pbxproj.ts +267 -0
  44. package/src/transformers/ios/plist.ts +198 -0
  45. package/src/utils/fs.ts +429 -0
  46. package/src/utils/index.ts +21 -0
  47. package/src/utils/logger.ts +203 -0
  48. package/templates/.gitignore +63 -0
  49. package/templates/Gemfile +3 -0
  50. package/templates/android/app/build.gradle.kts +97 -0
  51. package/templates/android/app/proguard-rules.pro +10 -0
  52. package/templates/android/app/src/main/AndroidManifest.xml +26 -0
  53. package/templates/android/app/src/main/java/com/appname/MainActivity.kt +22 -0
  54. package/templates/android/app/src/main/java/com/appname/MainApplication.kt +44 -0
  55. package/templates/android/app/src/main/res/values/strings.xml +3 -0
  56. package/templates/android/app/src/main/res/values/styles.xml +7 -0
  57. package/templates/android/build.gradle.kts +44 -0
  58. package/templates/android/gradle.properties +39 -0
  59. package/templates/android/settings.gradle.kts +12 -0
  60. package/templates/babel.config.js +15 -0
  61. package/templates/index.js +7 -0
  62. package/templates/ios/.xcode.env +11 -0
  63. package/templates/ios/AppName/AppDelegate.swift +25 -0
  64. package/templates/ios/AppName/AppName-Bridging-Header.h +4 -0
  65. package/templates/ios/AppName/AppName.entitlements +6 -0
  66. package/templates/ios/AppName/Images.xcassets/AppIcon.appiconset/Contents.json +35 -0
  67. package/templates/ios/AppName/Images.xcassets/Contents.json +6 -0
  68. package/templates/ios/AppName/Info.plist +49 -0
  69. package/templates/ios/AppName/LaunchScreen.storyboard +38 -0
  70. package/templates/ios/AppName.xcodeproj/project.pbxproj +402 -0
  71. package/templates/ios/AppName.xcodeproj/xcshareddata/xcschemes/AppName.xcscheme +78 -0
  72. package/templates/ios/Podfile +35 -0
  73. package/templates/metro.config.js +41 -0
  74. package/templates/package.json +57 -0
  75. package/templates/react-native.config.js +8 -0
  76. package/templates/src/app/index.tsx +34 -0
  77. package/templates/src/assets/fonts/.gitkeep +1 -0
  78. package/templates/src/assets/images/.gitkeep +1 -0
  79. package/templates/src/components/ui/accordion.tsx +114 -0
  80. package/templates/src/components/ui/avatar.tsx +75 -0
  81. package/templates/src/components/ui/button.tsx +93 -0
  82. package/templates/src/components/ui/card.tsx +120 -0
  83. package/templates/src/components/ui/checkbox.tsx +133 -0
  84. package/templates/src/components/ui/chip.tsx +95 -0
  85. package/templates/src/components/ui/dialog.tsx +134 -0
  86. package/templates/src/components/ui/divider.tsx +67 -0
  87. package/templates/src/components/ui/error-view.tsx +82 -0
  88. package/templates/src/components/ui/form-field.tsx +101 -0
  89. package/templates/src/components/ui/index.ts +100 -0
  90. package/templates/src/components/ui/popover.tsx +92 -0
  91. package/templates/src/components/ui/pressable-feedback.tsx +88 -0
  92. package/templates/src/components/ui/radio-group.tsx +153 -0
  93. package/templates/src/components/ui/scroll-shadow.tsx +108 -0
  94. package/templates/src/components/ui/select.tsx +165 -0
  95. package/templates/src/components/ui/skeleton-group.tsx +97 -0
  96. package/templates/src/components/ui/skeleton.tsx +87 -0
  97. package/templates/src/components/ui/spinner.tsx +87 -0
  98. package/templates/src/components/ui/surface.tsx +95 -0
  99. package/templates/src/components/ui/switch.tsx +124 -0
  100. package/templates/src/components/ui/tabs.tsx +154 -0
  101. package/templates/src/components/ui/text-field.tsx +106 -0
  102. package/templates/src/components/ui/toast.tsx +129 -0
  103. package/templates/src/contexts/.gitkeep +2 -0
  104. package/templates/src/core/clients/api/api.client.ts +113 -0
  105. package/templates/src/core/clients/api/index.ts +1 -0
  106. package/templates/src/core/clients/storage/index.ts +1 -0
  107. package/templates/src/core/clients/storage/storage.client.ts +121 -0
  108. package/templates/src/core/constants/index.ts +19 -0
  109. package/templates/src/core/core.ts +40 -0
  110. package/templates/src/core/index.ts +10 -0
  111. package/templates/src/global.css +87 -0
  112. package/templates/src/hooks/index.ts +6 -0
  113. package/templates/src/hooks/use-debounce.ts +23 -0
  114. package/templates/src/hooks/use-mounted.ts +21 -0
  115. package/templates/src/index.ts +28 -0
  116. package/templates/src/lib/index.ts +5 -0
  117. package/templates/src/lib/utils.ts +115 -0
  118. package/templates/src/modules/.gitkeep +6 -0
  119. package/templates/src/navigation/index.ts +8 -0
  120. package/templates/src/navigation/navigation-provider.tsx +36 -0
  121. package/templates/src/navigation/router.tsx +137 -0
  122. package/templates/src/providers/app.provider.tsx +29 -0
  123. package/templates/src/providers/index.ts +5 -0
  124. package/templates/src/routes/(tabs)/_layout.tsx +42 -0
  125. package/templates/src/routes/(tabs)/explore.tsx +161 -0
  126. package/templates/src/routes/(tabs)/home.tsx +138 -0
  127. package/templates/src/routes/(tabs)/profile.tsx +151 -0
  128. package/templates/src/routes/_layout.tsx +18 -0
  129. package/templates/src/routes/settings.tsx +194 -0
  130. package/templates/src/screens/auth/index.ts +6 -0
  131. package/templates/src/screens/auth/login.tsx +165 -0
  132. package/templates/src/screens/auth/register.tsx +203 -0
  133. package/templates/src/screens/home.tsx +204 -0
  134. package/templates/src/screens/index.ts +17 -0
  135. package/templates/src/screens/profile.tsx +210 -0
  136. package/templates/src/screens/settings.tsx +216 -0
  137. package/templates/src/screens/welcome.tsx +101 -0
  138. package/templates/src/styles/index.ts +103 -0
  139. package/templates/src/types/common.ts +71 -0
  140. package/templates/src/types/index.ts +5 -0
  141. package/templates/tsconfig.json +14 -0
  142. package/README.md +0 -15
  143. package/assets/favicon.ico +0 -0
  144. package/dist/commands/dev/dev.js +0 -55
  145. package/dist/commands/init/init-teardown.js +0 -26
  146. package/dist/index.js +0 -20
  147. package/dist/modules/dev/dev-menu/keyboard-handler.js +0 -138
  148. package/dist/modules/dev/dev-menu/open-debugger-keyboard-handler.js +0 -105
  149. package/dist/modules/dev/dev-server/cdp/cdp.adapter.js +0 -12
  150. package/dist/modules/dev/dev-server/cdp/index.js +0 -18
  151. package/dist/modules/dev/dev-server/cdp/types.js +0 -2
  152. package/dist/modules/dev/dev-server/dev-server-checker.js +0 -72
  153. package/dist/modules/dev/dev-server/dev-server.js +0 -269
  154. package/dist/modules/dev/dev-server/inspector/device.event-reporter.js +0 -165
  155. package/dist/modules/dev/dev-server/inspector/device.js +0 -577
  156. package/dist/modules/dev/dev-server/inspector/inspector.js +0 -204
  157. package/dist/modules/dev/dev-server/inspector/types.js +0 -2
  158. package/dist/modules/dev/dev-server/inspector/wss/servers/debugger-connection.server.js +0 -61
  159. package/dist/modules/dev/dev-server/inspector/wss/servers/device-connection.server.js +0 -64
  160. package/dist/modules/dev/dev-server/plugins/devtools.plugin.js +0 -50
  161. package/dist/modules/dev/dev-server/plugins/favicon.plugin.js +0 -19
  162. package/dist/modules/dev/dev-server/plugins/multipart.plugin.js +0 -62
  163. package/dist/modules/dev/dev-server/plugins/systrace.plugin.js +0 -28
  164. package/dist/modules/dev/dev-server/plugins/types.js +0 -2
  165. package/dist/modules/dev/dev-server/plugins/wss/index.js +0 -19
  166. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-api.server.js +0 -66
  167. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-debugger.server.js +0 -128
  168. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-dev-client.server.js +0 -75
  169. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-events.server.js +0 -198
  170. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-hmr.server.js +0 -120
  171. package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-message.server.js +0 -357
  172. package/dist/modules/dev/dev-server/plugins/wss/types.js +0 -2
  173. package/dist/modules/dev/dev-server/plugins/wss/web-socket-router.js +0 -57
  174. package/dist/modules/dev/dev-server/plugins/wss/web-socket-server-adapter.js +0 -26
  175. package/dist/modules/dev/dev-server/plugins/wss/web-socket-server.js +0 -46
  176. package/dist/modules/dev/dev-server/plugins/wss/wss.plugin.js +0 -55
  177. package/dist/modules/dev/dev-server/sybmolicate/sybmolicate.plugin.js +0 -36
  178. package/dist/modules/dev/dev-server/sybmolicate/types.js +0 -2
  179. package/dist/modules/dev/terminal/base.terminal.reporter.js +0 -78
  180. package/dist/modules/dev/terminal/terminal.reporter.js +0 -76
  181. package/dist/modules/dev/types.js +0 -2
  182. package/dist/modules/dev/utils/log.js +0 -73
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Chip Component
3
+ *
4
+ * A compact element for displaying tags, statuses, or interactive elements.
5
+ *
6
+ * @example Basic Usage
7
+ * ```tsx
8
+ * <Chip>Default Chip</Chip>
9
+ * ```
10
+ *
11
+ * @example Variants
12
+ * ```tsx
13
+ * <Chip variant="solid">Solid</Chip>
14
+ * <Chip variant="bordered">Bordered</Chip>
15
+ * <Chip variant="light">Light</Chip>
16
+ * <Chip variant="flat">Flat</Chip>
17
+ * <Chip variant="faded">Faded</Chip>
18
+ * <Chip variant="shadow">Shadow</Chip>
19
+ * <Chip variant="dot">Dot</Chip>
20
+ * ```
21
+ *
22
+ * @example Colors
23
+ * ```tsx
24
+ * <Chip color="default">Default</Chip>
25
+ * <Chip color="primary">Primary</Chip>
26
+ * <Chip color="secondary">Secondary</Chip>
27
+ * <Chip color="success">Success</Chip>
28
+ * <Chip color="warning">Warning</Chip>
29
+ * <Chip color="danger">Danger</Chip>
30
+ * ```
31
+ *
32
+ * @example Sizes
33
+ * ```tsx
34
+ * <Chip size="sm">Small</Chip>
35
+ * <Chip size="md">Medium</Chip>
36
+ * <Chip size="lg">Large</Chip>
37
+ * ```
38
+ *
39
+ * @example With Close Button
40
+ * ```tsx
41
+ * <Chip onClose={() => console.log('Closed!')}>
42
+ * Closable Chip
43
+ * </Chip>
44
+ * ```
45
+ *
46
+ * @example With Avatar
47
+ * ```tsx
48
+ * <Chip
49
+ * avatar={<Avatar src="https://example.com/avatar.jpg" />}
50
+ * >
51
+ * User Chip
52
+ * </Chip>
53
+ * ```
54
+ *
55
+ * @example With Start/End Content
56
+ * ```tsx
57
+ * <Chip startContent={<Icon name="star" />}>
58
+ * Featured
59
+ * </Chip>
60
+ * <Chip endContent={<Icon name="check" />}>
61
+ * Verified
62
+ * </Chip>
63
+ * ```
64
+ *
65
+ * @example Disabled State
66
+ * ```tsx
67
+ * <Chip isDisabled>
68
+ * Disabled Chip
69
+ * </Chip>
70
+ * ```
71
+ *
72
+ * @example Radius
73
+ * ```tsx
74
+ * <Chip radius="none">None</Chip>
75
+ * <Chip radius="sm">Small</Chip>
76
+ * <Chip radius="md">Medium</Chip>
77
+ * <Chip radius="lg">Large</Chip>
78
+ * <Chip radius="full">Full</Chip>
79
+ * ```
80
+ */
81
+
82
+ import type { ChipProps as HeroChipProps } from "heroui-native";
83
+ import { Chip as HeroChip } from "heroui-native";
84
+ import { forwardRef } from "react";
85
+ import type { View as ViewRef } from "react-native";
86
+
87
+ const ChipRoot = forwardRef<ViewRef, HeroChipProps>((props, ref) => {
88
+ return <HeroChip ref={ref} {...props} />;
89
+ });
90
+ ChipRoot.displayName = "Chip";
91
+
92
+ export const Chip = ChipRoot;
93
+
94
+ // Re-export types for convenience
95
+ export type { HeroChipProps as ChipProps };
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Dialog Component
3
+ *
4
+ * A modal dialog component for displaying important content and actions.
5
+ *
6
+ * @example Basic Usage
7
+ * ```tsx
8
+ * const [isOpen, setOpen] = useState(false);
9
+ *
10
+ * <Button onPress={() => setOpen(true)}>Open Dialog</Button>
11
+ *
12
+ * <Dialog isOpen={isOpen} onClose={() => setOpen(false)}>
13
+ * <DialogHeader>
14
+ * <Text>Dialog Title</Text>
15
+ * </DialogHeader>
16
+ * <DialogBody>
17
+ * <Text>Dialog content goes here</Text>
18
+ * </DialogBody>
19
+ * <DialogFooter>
20
+ * <Button onPress={() => setOpen(false)}>Close</Button>
21
+ * </DialogFooter>
22
+ * </Dialog>
23
+ * ```
24
+ *
25
+ * @example Simple Alert
26
+ * ```tsx
27
+ * <Dialog isOpen={isOpen} onClose={handleClose}>
28
+ * <DialogHeader>
29
+ * <Text>Alert</Text>
30
+ * </DialogHeader>
31
+ * <DialogBody>
32
+ * <Text>Are you sure you want to proceed?</Text>
33
+ * </DialogBody>
34
+ * <DialogFooter>
35
+ * <Button variant="light" onPress={handleClose}>Cancel</Button>
36
+ * <Button color="primary" onPress={handleConfirm}>Confirm</Button>
37
+ * </DialogFooter>
38
+ * </Dialog>
39
+ * ```
40
+ *
41
+ * @example Sizes
42
+ * ```tsx
43
+ * <Dialog size="xs">Extra Small</Dialog>
44
+ * <Dialog size="sm">Small</Dialog>
45
+ * <Dialog size="md">Medium</Dialog>
46
+ * <Dialog size="lg">Large</Dialog>
47
+ * <Dialog size="xl">Extra Large</Dialog>
48
+ * <Dialog size="full">Full Screen</Dialog>
49
+ * ```
50
+ *
51
+ * @example Placements
52
+ * ```tsx
53
+ * <Dialog placement="center">Centered Dialog</Dialog>
54
+ * <Dialog placement="top">Top Dialog</Dialog>
55
+ * <Dialog placement="bottom">Bottom Dialog</Dialog>
56
+ * ```
57
+ *
58
+ * @example Without Backdrop Close
59
+ * ```tsx
60
+ * <Dialog
61
+ * isOpen={isOpen}
62
+ * onClose={handleClose}
63
+ * isDismissable={false}
64
+ * >
65
+ * <DialogBody>
66
+ * <Text>Click outside won't close this dialog</Text>
67
+ * </DialogBody>
68
+ * </Dialog>
69
+ * ```
70
+ *
71
+ * @example Scrollable Body
72
+ * ```tsx
73
+ * <Dialog scrollBehavior="inside">
74
+ * <DialogHeader>
75
+ * <Text>Long Content</Text>
76
+ * </DialogHeader>
77
+ * <DialogBody>
78
+ * <Text>Long content that scrolls...</Text>
79
+ * </DialogBody>
80
+ * </Dialog>
81
+ * ```
82
+ */
83
+
84
+ import type {
85
+ DialogBodyProps as HeroDialogBodyProps,
86
+ DialogFooterProps as HeroDialogFooterProps,
87
+ DialogHeaderProps as HeroDialogHeaderProps,
88
+ DialogProps as HeroDialogProps,
89
+ } from "heroui-native";
90
+ import {
91
+ Dialog as HeroDialog,
92
+ DialogBody as HeroDialogBody,
93
+ DialogFooter as HeroDialogFooter,
94
+ DialogHeader as HeroDialogHeader,
95
+ } from "heroui-native";
96
+ import { forwardRef } from "react";
97
+ import type { View as ViewRef } from "react-native";
98
+
99
+ // Dialog Root component
100
+ const DialogRoot = forwardRef<ViewRef, HeroDialogProps>((props, ref) => {
101
+ return <HeroDialog ref={ref} {...props} />;
102
+ });
103
+ DialogRoot.displayName = "Dialog";
104
+
105
+ // Dialog Header component
106
+ const DialogHeaderComponent = forwardRef<ViewRef, HeroDialogHeaderProps>((props, ref) => {
107
+ return <HeroDialogHeader ref={ref} {...props} />;
108
+ });
109
+ DialogHeaderComponent.displayName = "DialogHeader";
110
+
111
+ // Dialog Body component
112
+ const DialogBodyComponent = forwardRef<ViewRef, HeroDialogBodyProps>((props, ref) => {
113
+ return <HeroDialogBody ref={ref} {...props} />;
114
+ });
115
+ DialogBodyComponent.displayName = "DialogBody";
116
+
117
+ // Dialog Footer component
118
+ const DialogFooterComponent = forwardRef<ViewRef, HeroDialogFooterProps>((props, ref) => {
119
+ return <HeroDialogFooter ref={ref} {...props} />;
120
+ });
121
+ DialogFooterComponent.displayName = "DialogFooter";
122
+
123
+ export const Dialog = DialogRoot;
124
+ export const DialogHeader = DialogHeaderComponent;
125
+ export const DialogBody = DialogBodyComponent;
126
+ export const DialogFooter = DialogFooterComponent;
127
+
128
+ // Re-export types for convenience
129
+ export type {
130
+ HeroDialogProps as DialogProps,
131
+ HeroDialogHeaderProps as DialogHeaderProps,
132
+ HeroDialogBodyProps as DialogBodyProps,
133
+ HeroDialogFooterProps as DialogFooterProps,
134
+ };
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Divider Component
3
+ *
4
+ * A visual separator for content sections.
5
+ *
6
+ * @example Basic Usage
7
+ * ```tsx
8
+ * <Text>Section 1</Text>
9
+ * <Divider />
10
+ * <Text>Section 2</Text>
11
+ * ```
12
+ *
13
+ * @example Orientations
14
+ * ```tsx
15
+ * // Horizontal (default)
16
+ * <Divider orientation="horizontal" />
17
+ *
18
+ * // Vertical
19
+ * <View style={{ flexDirection: 'row', height: 50 }}>
20
+ * <Text>Left</Text>
21
+ * <Divider orientation="vertical" />
22
+ * <Text>Right</Text>
23
+ * </View>
24
+ * ```
25
+ *
26
+ * @example In a Card
27
+ * ```tsx
28
+ * <Card>
29
+ * <CardHeader>
30
+ * <Text>Title</Text>
31
+ * </CardHeader>
32
+ * <Divider />
33
+ * <CardBody>
34
+ * <Text>Content</Text>
35
+ * </CardBody>
36
+ * <Divider />
37
+ * <CardFooter>
38
+ * <Button>Action</Button>
39
+ * </CardFooter>
40
+ * </Card>
41
+ * ```
42
+ *
43
+ * @example In a List
44
+ * ```tsx
45
+ * {items.map((item, index) => (
46
+ * <Fragment key={item.id}>
47
+ * <ListItem>{item.title}</ListItem>
48
+ * {index < items.length - 1 && <Divider />}
49
+ * </Fragment>
50
+ * ))}
51
+ * ```
52
+ */
53
+
54
+ import type { DividerProps as HeroDividerProps } from "heroui-native";
55
+ import { Divider as HeroDivider } from "heroui-native";
56
+ import { forwardRef } from "react";
57
+ import type { View as ViewRef } from "react-native";
58
+
59
+ const DividerRoot = forwardRef<ViewRef, HeroDividerProps>((props, ref) => {
60
+ return <HeroDivider ref={ref} {...props} />;
61
+ });
62
+ DividerRoot.displayName = "Divider";
63
+
64
+ export const Divider = DividerRoot;
65
+
66
+ // Re-export types for convenience
67
+ export type { HeroDividerProps as DividerProps };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * ErrorView Component
3
+ *
4
+ * A component for displaying error states with optional retry functionality.
5
+ *
6
+ * @example Basic Usage
7
+ * ```tsx
8
+ * <ErrorView
9
+ * title="Something went wrong"
10
+ * description="Please try again later"
11
+ * />
12
+ * ```
13
+ *
14
+ * @example With Retry Button
15
+ * ```tsx
16
+ * <ErrorView
17
+ * title="Failed to load data"
18
+ * description="Unable to fetch the requested information"
19
+ * onRetry={() => refetch()}
20
+ * retryText="Try Again"
21
+ * />
22
+ * ```
23
+ *
24
+ * @example Custom Icon
25
+ * ```tsx
26
+ * <ErrorView
27
+ * title="Network Error"
28
+ * description="Check your internet connection"
29
+ * icon={<WifiOffIcon />}
30
+ * onRetry={handleRetry}
31
+ * />
32
+ * ```
33
+ *
34
+ * @example In Error Boundary
35
+ * ```tsx
36
+ * function ErrorFallback({ error, resetErrorBoundary }) {
37
+ * return (
38
+ * <ErrorView
39
+ * title="Application Error"
40
+ * description={error.message}
41
+ * onRetry={resetErrorBoundary}
42
+ * />
43
+ * );
44
+ * }
45
+ * ```
46
+ *
47
+ * @example Empty State
48
+ * ```tsx
49
+ * <ErrorView
50
+ * title="No results found"
51
+ * description="Try adjusting your search criteria"
52
+ * icon={<SearchIcon />}
53
+ * />
54
+ * ```
55
+ *
56
+ * @example Full Screen Error
57
+ * ```tsx
58
+ * <View style={{ flex: 1 }}>
59
+ * <ErrorView
60
+ * title="Page Not Found"
61
+ * description="The page you're looking for doesn't exist"
62
+ * onRetry={() => navigation.goBack()}
63
+ * retryText="Go Back"
64
+ * />
65
+ * </View>
66
+ * ```
67
+ */
68
+
69
+ import type { ErrorViewProps as HeroErrorViewProps } from "heroui-native";
70
+ import { ErrorView as HeroErrorView } from "heroui-native";
71
+ import { forwardRef } from "react";
72
+ import type { View as ViewRef } from "react-native";
73
+
74
+ const ErrorViewRoot = forwardRef<ViewRef, HeroErrorViewProps>((props, ref) => {
75
+ return <HeroErrorView ref={ref} {...props} />;
76
+ });
77
+ ErrorViewRoot.displayName = "ErrorView";
78
+
79
+ export const ErrorView = ErrorViewRoot;
80
+
81
+ // Re-export types for convenience
82
+ export type { HeroErrorViewProps as ErrorViewProps };
@@ -0,0 +1,101 @@
1
+ /**
2
+ * FormField Component
3
+ *
4
+ * A wrapper component for form controls that provides label, description, and error message support.
5
+ *
6
+ * @example Basic Usage
7
+ * ```tsx
8
+ * <FormField label="Email" description="Enter your email address">
9
+ * <Input placeholder="email@example.com" />
10
+ * </FormField>
11
+ * ```
12
+ *
13
+ * @example Required Field
14
+ * ```tsx
15
+ * <FormField
16
+ * label="Username"
17
+ * isRequired
18
+ * >
19
+ * <Input placeholder="Choose a username" />
20
+ * </FormField>
21
+ * ```
22
+ *
23
+ * @example With Error Message
24
+ * ```tsx
25
+ * <FormField
26
+ * label="Password"
27
+ * isInvalid
28
+ * errorMessage="Password must be at least 8 characters"
29
+ * >
30
+ * <Input type="password" />
31
+ * </FormField>
32
+ * ```
33
+ *
34
+ * @example With Description
35
+ * ```tsx
36
+ * <FormField
37
+ * label="Bio"
38
+ * description="Tell us about yourself (max 200 characters)"
39
+ * >
40
+ * <TextArea placeholder="Write your bio..." />
41
+ * </FormField>
42
+ * ```
43
+ *
44
+ * @example Disabled State
45
+ * ```tsx
46
+ * <FormField
47
+ * label="Read Only Field"
48
+ * isDisabled
49
+ * >
50
+ * <Input value="Cannot be edited" />
51
+ * </FormField>
52
+ * ```
53
+ *
54
+ * @example With Checkbox
55
+ * ```tsx
56
+ * <FormField
57
+ * label="Preferences"
58
+ * description="Select all that apply"
59
+ * >
60
+ * <CheckboxGroup>
61
+ * <Checkbox value="notifications">Email notifications</Checkbox>
62
+ * <Checkbox value="updates">Product updates</Checkbox>
63
+ * </CheckboxGroup>
64
+ * </FormField>
65
+ * ```
66
+ *
67
+ * @example Full Form Example
68
+ * ```tsx
69
+ * <View style={{ gap: 16 }}>
70
+ * <FormField label="Full Name" isRequired>
71
+ * <Input placeholder="John Doe" />
72
+ * </FormField>
73
+ *
74
+ * <FormField
75
+ * label="Email"
76
+ * isRequired
77
+ * isInvalid={!isValidEmail}
78
+ * errorMessage="Please enter a valid email"
79
+ * >
80
+ * <Input placeholder="john@example.com" />
81
+ * </FormField>
82
+ *
83
+ * <Button type="submit">Submit</Button>
84
+ * </View>
85
+ * ```
86
+ */
87
+
88
+ import type { FormFieldProps as HeroFormFieldProps } from "heroui-native";
89
+ import { FormField as HeroFormField } from "heroui-native";
90
+ import { forwardRef } from "react";
91
+ import type { View as ViewRef } from "react-native";
92
+
93
+ const FormFieldRoot = forwardRef<ViewRef, HeroFormFieldProps>((props, ref) => {
94
+ return <HeroFormField ref={ref} {...props} />;
95
+ });
96
+ FormFieldRoot.displayName = "FormField";
97
+
98
+ export const FormField = FormFieldRoot;
99
+
100
+ // Re-export types for convenience
101
+ export type { HeroFormFieldProps as FormFieldProps };
@@ -0,0 +1,100 @@
1
+ /**
2
+ * UI Components Barrel Export (HeroUI Native)
3
+ *
4
+ * All components are wrappers around HeroUI Native components,
5
+ * allowing for future customization and modifications.
6
+ */
7
+
8
+ // Accordion
9
+ export { Accordion, AccordionItem, type AccordionProps, type AccordionItemProps } from "./accordion";
10
+
11
+ // Avatar
12
+ export { Avatar, type AvatarProps } from "./avatar";
13
+
14
+ // Button
15
+ export { Button, type ButtonProps } from "./button";
16
+
17
+ // Card
18
+ export {
19
+ Card,
20
+ CardHeader,
21
+ CardBody,
22
+ CardFooter,
23
+ type CardProps,
24
+ type CardHeaderProps,
25
+ type CardBodyProps,
26
+ type CardFooterProps,
27
+ } from "./card";
28
+
29
+ // Checkbox
30
+ export { Checkbox, CheckboxGroup, type CheckboxProps, type CheckboxGroupProps } from "./checkbox";
31
+
32
+ // Chip
33
+ export { Chip, type ChipProps } from "./chip";
34
+
35
+ // Dialog
36
+ export {
37
+ Dialog,
38
+ DialogHeader,
39
+ DialogBody,
40
+ DialogFooter,
41
+ type DialogProps,
42
+ type DialogHeaderProps,
43
+ type DialogBodyProps,
44
+ type DialogFooterProps,
45
+ } from "./dialog";
46
+
47
+ // Divider
48
+ export { Divider, type DividerProps } from "./divider";
49
+
50
+ // Error View
51
+ export { ErrorView, type ErrorViewProps } from "./error-view";
52
+
53
+ // Form Field
54
+ export { FormField, type FormFieldProps } from "./form-field";
55
+
56
+ // Popover
57
+ export { Popover, type PopoverProps } from "./popover";
58
+
59
+ // Pressable Feedback
60
+ export { PressableFeedback, type PressableFeedbackProps } from "./pressable-feedback";
61
+
62
+ // Radio Group
63
+ export { Radio, RadioGroup, type RadioProps, type RadioGroupProps } from "./radio-group";
64
+
65
+ // Scroll Shadow
66
+ export { ScrollShadow, type ScrollShadowProps } from "./scroll-shadow";
67
+
68
+ // Select
69
+ export { Select, SelectItem, type SelectProps, type SelectItemProps } from "./select";
70
+
71
+ // Skeleton
72
+ export { Skeleton, type SkeletonProps } from "./skeleton";
73
+
74
+ // Skeleton Group
75
+ export { SkeletonGroup, type SkeletonGroupProps } from "./skeleton-group";
76
+
77
+ // Spinner
78
+ export { Spinner, type SpinnerProps } from "./spinner";
79
+
80
+ // Surface
81
+ export { Surface, type SurfaceProps } from "./surface";
82
+
83
+ // Switch
84
+ export { Switch, type SwitchProps } from "./switch";
85
+
86
+ // Tabs
87
+ export { Tabs, Tab, type TabsProps, type TabProps } from "./tabs";
88
+
89
+ // Text Field
90
+ export {
91
+ TextField,
92
+ type TextFieldProps,
93
+ type TextFieldLabelProps,
94
+ type TextFieldInputProps,
95
+ type TextFieldDescriptionProps,
96
+ type TextFieldErrorMessageProps,
97
+ } from "./text-field";
98
+
99
+ // Toast
100
+ export { Toast, type ToastProps } from "./toast";
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Popover Component
3
+ *
4
+ * A floating panel for displaying additional content on demand.
5
+ *
6
+ * @example Basic Usage
7
+ * ```tsx
8
+ * <Popover>
9
+ * <Popover.Trigger>
10
+ * <Button>Open Popover</Button>
11
+ * </Popover.Trigger>
12
+ * <Popover.Content>
13
+ * <Text>Popover content</Text>
14
+ * </Popover.Content>
15
+ * </Popover>
16
+ * ```
17
+ *
18
+ * @example Controlled
19
+ * ```tsx
20
+ * const [isOpen, setOpen] = useState(false);
21
+ *
22
+ * <Popover isOpen={isOpen} onOpenChange={setOpen}>
23
+ * <Popover.Trigger>
24
+ * <Button>Toggle Popover</Button>
25
+ * </Popover.Trigger>
26
+ * <Popover.Content>
27
+ * <Text>Controlled popover content</Text>
28
+ * </Popover.Content>
29
+ * </Popover>
30
+ * ```
31
+ *
32
+ * @example Placements
33
+ * ```tsx
34
+ * <Popover placement="top">Top</Popover>
35
+ * <Popover placement="bottom">Bottom</Popover>
36
+ * <Popover placement="left">Left</Popover>
37
+ * <Popover placement="right">Right</Popover>
38
+ * <Popover placement="top-start">Top Start</Popover>
39
+ * <Popover placement="top-end">Top End</Popover>
40
+ * ```
41
+ *
42
+ * @example With Offset
43
+ * ```tsx
44
+ * <Popover offset={10}>
45
+ * <Popover.Trigger>
46
+ * <Button>With Offset</Button>
47
+ * </Popover.Trigger>
48
+ * <Popover.Content>
49
+ * <Text>Content with offset</Text>
50
+ * </Popover.Content>
51
+ * </Popover>
52
+ * ```
53
+ *
54
+ * @example Custom Backdrop
55
+ * ```tsx
56
+ * <Popover backdrop="blur">
57
+ * <Popover.Trigger>
58
+ * <Button>Blur Backdrop</Button>
59
+ * </Popover.Trigger>
60
+ * <Popover.Content>
61
+ * <Text>Content with blur backdrop</Text>
62
+ * </Popover.Content>
63
+ * </Popover>
64
+ * ```
65
+ *
66
+ * @example With Arrow
67
+ * ```tsx
68
+ * <Popover showArrow>
69
+ * <Popover.Trigger>
70
+ * <Button>With Arrow</Button>
71
+ * </Popover.Trigger>
72
+ * <Popover.Content>
73
+ * <Text>Content with arrow</Text>
74
+ * </Popover.Content>
75
+ * </Popover>
76
+ * ```
77
+ */
78
+
79
+ import type { PopoverProps as HeroPopoverProps } from "heroui-native";
80
+ import { Popover as HeroPopover } from "heroui-native";
81
+ import { forwardRef } from "react";
82
+ import type { View as ViewRef } from "react-native";
83
+
84
+ const PopoverRoot = forwardRef<ViewRef, HeroPopoverProps>((props, ref) => {
85
+ return <HeroPopover ref={ref} {...props} />;
86
+ });
87
+ PopoverRoot.displayName = "Popover";
88
+
89
+ export const Popover = PopoverRoot;
90
+
91
+ // Re-export types for convenience
92
+ export type { HeroPopoverProps as PopoverProps };