@beyondcorp/beyond-ui-native 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/preset.mjs CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  preset_default,
4
4
  tokens
5
5
  } from "./chunk-RNHEGFYR.mjs";
6
+ import "./chunk-BJTO5JO5.mjs";
6
7
  export {
7
8
  beyondUIPreset,
8
9
  preset_default as default,
@@ -3,6 +3,7 @@ import {
3
3
  getAccessibilityProps,
4
4
  joinA11yLabels
5
5
  } from "./chunk-UTNW3LJA.mjs";
6
+ import "./chunk-BJTO5JO5.mjs";
6
7
  export {
7
8
  cn,
8
9
  getAccessibilityProps,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beyondcorp/beyond-ui-native",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Accessible, NativeWind-first React Native component library for Beyond Softwares",
5
5
  "author": "Beyond Corp",
6
6
  "license": "MIT",
@@ -148,7 +148,7 @@ export const AccordionItem = React.forwardRef<View, AccordionItemProps>(
148
148
  <AccordionItemContext.Provider value={{ value, isOpen }}>
149
149
  <View
150
150
  ref={ref}
151
- className={cn("border-b border-border py-1", className)}
151
+ className={cn("border-b border-neutral-200 dark:border-neutral-800 py-1", className)}
152
152
  {...props}
153
153
  >
154
154
  {children}
@@ -200,13 +200,13 @@ export const AccordionTrigger = React.forwardRef<View, AccordionTriggerProps>(
200
200
  >
201
201
  <View className="flex-1 pr-2">
202
202
  {typeof children === "string" ? (
203
- <Text className="text-base font-medium text-foreground">{children}</Text>
203
+ <Text className="text-base font-medium text-neutral-900 dark:text-neutral-100">{children}</Text>
204
204
  ) : (
205
205
  children
206
206
  )}
207
207
  </View>
208
208
  <Animated.View style={{ transform: [{ rotate }] }}>
209
- <Text className="text-muted text-base font-semibold">▼</Text>
209
+ <Text className="text-neutral-500 dark:text-neutral-400 text-base font-semibold">▼</Text>
210
210
  </Animated.View>
211
211
  </Pressable>
212
212
  );
@@ -230,11 +230,11 @@ export const AccordionContent = React.forwardRef<View, AccordionContentProps>(
230
230
  return (
231
231
  <View
232
232
  ref={ref}
233
- className={cn("pt-1 pb-3 px-1 text-sm text-muted", className)}
233
+ className={cn("pt-1 pb-3 px-1", className)}
234
234
  {...props}
235
235
  >
236
236
  {typeof children === "string" ? (
237
- <Text className="text-sm text-muted leading-relaxed">{children}</Text>
237
+ <Text className="text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed">{children}</Text>
238
238
  ) : (
239
239
  children
240
240
  )}
@@ -5,6 +5,35 @@ import { PortalHost } from "@rn-primitives/portal";
5
5
  import { ToastContext, ToastItem, ToastContextValue } from "../components/toast/types";
6
6
  import { ToastContainer } from "../components/toast/toast";
7
7
 
8
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
9
+ try {
10
+ const { LogBox } = require("react-native");
11
+ LogBox?.ignoreLogs?.([
12
+ "You are setting the style `{ shadowOffset: ... }` as a prop",
13
+ "You are setting the style",
14
+ ]);
15
+
16
+ if (!Boolean((console.error as any)?.__beyond_ui_filtered)) {
17
+ const originalError = console.error;
18
+ const filteredError = (...args: any[]) => {
19
+ const fullMessage = args
20
+ .map((arg) => (typeof arg === "string" ? arg : ""))
21
+ .join(" ");
22
+
23
+ if (
24
+ fullMessage.includes("shadowOffset") ||
25
+ fullMessage.includes("You are setting the style")
26
+ ) {
27
+ return;
28
+ }
29
+ originalError(...args);
30
+ };
31
+ (filteredError as any).__beyond_ui_filtered = true;
32
+ console.error = filteredError;
33
+ }
34
+ } catch (_) {}
35
+ }
36
+
8
37
  export type ColorScheme = "light" | "dark" | "system";
9
38
 
10
39
  export interface BeyondUIContextValue {
@@ -50,7 +50,7 @@ export const ForgotPasswordTemplate: React.FC<ForgotPasswordTemplateProps> = ({
50
50
  <KeyboardAvoidingView
51
51
  behavior={Platform.OS === "ios" ? "padding" : "height"}
52
52
  style={{ flex: 1 }}
53
- className={cn("flex-1 bg-background", className)}
53
+ className={cn("flex-1 bg-neutral-50 dark:bg-neutral-950", className)}
54
54
  >
55
55
  <ScrollView
56
56
  style={{ flex: 1 }}
@@ -61,10 +61,10 @@ export const ForgotPasswordTemplate: React.FC<ForgotPasswordTemplateProps> = ({
61
61
  >
62
62
  <View className="w-full max-w-md mx-auto gap-6">
63
63
  <View className="items-center gap-2">
64
- <Heading level={2} className="text-3xl font-extrabold text-foreground text-center">
64
+ <Heading level={2} className="text-3xl font-extrabold text-neutral-900 dark:text-neutral-50 text-center">
65
65
  {title}
66
66
  </Heading>
67
- <Text className="text-muted text-center text-base">
67
+ <Text className="text-neutral-500 dark:text-neutral-400 text-center text-base">
68
68
  {subtitle}
69
69
  </Text>
70
70
  </View>
@@ -117,7 +117,7 @@ export const ForgotPasswordTemplate: React.FC<ForgotPasswordTemplateProps> = ({
117
117
  {onBackToSignIn && (
118
118
  <View className="flex-row justify-center items-center gap-1.5 pt-2">
119
119
  <Pressable onPress={onBackToSignIn}>
120
- <Text className="text-sm font-semibold text-primary">
120
+ <Text className="text-sm font-semibold text-primary-600 dark:text-primary-400">
121
121
  Back to Sign In
122
122
  </Text>
123
123
  </Pressable>
@@ -72,7 +72,7 @@ export const SignInTemplate: React.FC<SignInTemplateProps> = ({
72
72
  <KeyboardAvoidingView
73
73
  behavior={Platform.OS === "ios" ? "padding" : "height"}
74
74
  style={{ flex: 1 }}
75
- className={cn("flex-1 bg-background", className)}
75
+ className={cn("flex-1 bg-neutral-50 dark:bg-neutral-950", className)}
76
76
  >
77
77
  <ScrollView
78
78
  style={{ flex: 1 }}
@@ -85,10 +85,10 @@ export const SignInTemplate: React.FC<SignInTemplateProps> = ({
85
85
  {/* Logo & Header */}
86
86
  <View className="items-center gap-2">
87
87
  {logo && <View className="mb-2">{logo}</View>}
88
- <Heading level={2} className="text-3xl font-extrabold text-foreground text-center">
88
+ <Heading level={2} className="text-3xl font-extrabold text-neutral-900 dark:text-neutral-50 text-center">
89
89
  {title}
90
90
  </Heading>
91
- <Text className="text-muted text-center text-base">
91
+ <Text className="text-neutral-500 dark:text-neutral-400 text-center text-base">
92
92
  {subtitle}
93
93
  </Text>
94
94
  </View>
@@ -129,7 +129,7 @@ export const SignInTemplate: React.FC<SignInTemplateProps> = ({
129
129
  error={passwordError}
130
130
  rightElement={
131
131
  <Pressable onPress={() => setShowPassword((p) => !p)} className="p-1">
132
- <Text className="text-xs text-muted font-semibold">
132
+ <Text className="text-xs text-neutral-500 dark:text-neutral-400 font-semibold">
133
133
  {showPassword ? "HIDE" : "SHOW"}
134
134
  </Text>
135
135
  </Pressable>
@@ -141,12 +141,12 @@ export const SignInTemplate: React.FC<SignInTemplateProps> = ({
141
141
  <View className="flex-row items-center justify-between py-1">
142
142
  <View className="flex-row items-center gap-2">
143
143
  <Checkbox checked={rememberMe} onCheckedChange={setRememberMe} />
144
- <Text className="text-sm text-foreground">Remember me</Text>
144
+ <Text className="text-sm text-neutral-900 dark:text-neutral-100">Remember me</Text>
145
145
  </View>
146
146
 
147
147
  {onForgotPassword && (
148
148
  <Pressable onPress={onForgotPassword}>
149
- <Text className="text-sm font-semibold text-primary">
149
+ <Text className="text-sm font-semibold text-primary-600 dark:text-primary-400">
150
150
  Forgot password?
151
151
  </Text>
152
152
  </Pressable>
@@ -170,7 +170,7 @@ export const SignInTemplate: React.FC<SignInTemplateProps> = ({
170
170
  <View className="gap-4">
171
171
  <View className="flex-row items-center gap-3">
172
172
  <Separator className="flex-1" />
173
- <Text className="text-xs text-muted uppercase">or continue with</Text>
173
+ <Text className="text-xs text-neutral-500 dark:text-neutral-400 uppercase">or continue with</Text>
174
174
  <Separator className="flex-1" />
175
175
  </View>
176
176
 
@@ -200,9 +200,9 @@ export const SignInTemplate: React.FC<SignInTemplateProps> = ({
200
200
  {/* Switch to SignUp */}
201
201
  {onSignUpPress && (
202
202
  <View className="flex-row justify-center items-center gap-1.5 pt-2">
203
- <Text className="text-sm text-muted">Don't have an account?</Text>
203
+ <Text className="text-sm text-neutral-500 dark:text-neutral-400">Don't have an account?</Text>
204
204
  <Pressable onPress={onSignUpPress}>
205
- <Text className="text-sm font-bold text-primary">Sign Up</Text>
205
+ <Text className="text-sm font-bold text-primary-600 dark:text-primary-400">Sign Up</Text>
206
206
  </Pressable>
207
207
  </View>
208
208
  )}
@@ -88,7 +88,7 @@ export const SignUpTemplate: React.FC<SignUpTemplateProps> = ({
88
88
  <KeyboardAvoidingView
89
89
  behavior={Platform.OS === "ios" ? "padding" : "height"}
90
90
  style={{ flex: 1 }}
91
- className={cn("flex-1 bg-background", className)}
91
+ className={cn("flex-1 bg-neutral-50 dark:bg-neutral-950", className)}
92
92
  >
93
93
  <ScrollView
94
94
  style={{ flex: 1 }}
@@ -101,10 +101,10 @@ export const SignUpTemplate: React.FC<SignUpTemplateProps> = ({
101
101
  {/* Header */}
102
102
  <View className="items-center gap-2">
103
103
  {logo && <View className="mb-2">{logo}</View>}
104
- <Heading level={2} className="text-3xl font-extrabold text-foreground text-center">
104
+ <Heading level={2} className="text-3xl font-extrabold text-neutral-900 dark:text-neutral-50 text-center">
105
105
  {title}
106
106
  </Heading>
107
- <Text className="text-muted text-center text-base">
107
+ <Text className="text-neutral-500 dark:text-neutral-400 text-center text-base">
108
108
  {subtitle}
109
109
  </Text>
110
110
  </View>
@@ -164,7 +164,7 @@ export const SignUpTemplate: React.FC<SignUpTemplateProps> = ({
164
164
  if (termsError) setTermsError(undefined);
165
165
  }}
166
166
  />
167
- <Text className="text-sm text-foreground flex-1">
167
+ <Text className="text-sm text-neutral-900 dark:text-neutral-100 flex-1">
168
168
  I agree to the Terms of Service & Privacy Policy
169
169
  </Text>
170
170
  </View>
@@ -190,7 +190,7 @@ export const SignUpTemplate: React.FC<SignUpTemplateProps> = ({
190
190
  <View className="gap-4">
191
191
  <View className="flex-row items-center gap-3">
192
192
  <Separator className="flex-1" />
193
- <Text className="text-xs text-muted uppercase">or continue with</Text>
193
+ <Text className="text-xs text-neutral-500 dark:text-neutral-400 uppercase">or continue with</Text>
194
194
  <Separator className="flex-1" />
195
195
  </View>
196
196
 
@@ -220,9 +220,9 @@ export const SignUpTemplate: React.FC<SignUpTemplateProps> = ({
220
220
  {/* Back to SignIn */}
221
221
  {onSignInPress && (
222
222
  <View className="flex-row justify-center items-center gap-1.5 pt-2">
223
- <Text className="text-sm text-muted">Already have an account?</Text>
223
+ <Text className="text-sm text-neutral-500 dark:text-neutral-400">Already have an account?</Text>
224
224
  <Pressable onPress={onSignInPress}>
225
- <Text className="text-sm font-bold text-primary">Sign In</Text>
225
+ <Text className="text-sm font-bold text-primary-600 dark:text-primary-400">Sign In</Text>
226
226
  </Pressable>
227
227
  </View>
228
228
  )}
@@ -69,12 +69,12 @@ export const DashboardTemplate: React.FC<DashboardTemplateProps> = ({
69
69
  <ScrollView
70
70
  {...props}
71
71
  style={[{ flex: 1 }, (props as any).style]}
72
- className={cn("flex-1 bg-background", className)}
72
+ className={cn("flex-1 bg-neutral-50 dark:bg-neutral-950", className)}
73
73
  contentContainerStyle={{ paddingBottom: 40 }}
74
74
  showsVerticalScrollIndicator={false}
75
75
  >
76
76
  {/* Top Greeting Header */}
77
- <View className="px-6 pt-6 pb-4 flex-row items-center justify-between border-b border-border/40">
77
+ <View className="px-6 pt-6 pb-4 flex-row items-center justify-between border-b border-neutral-200 dark:border-neutral-800">
78
78
  <View className="flex-row items-center gap-3">
79
79
  <Avatar size="lg">
80
80
  {userAvatarUrl && <AvatarImage source={{ uri: userAvatarUrl }} />}
@@ -62,12 +62,12 @@ export const SettingsTemplate: React.FC<SettingsTemplateProps> = ({
62
62
  <ScrollView
63
63
  {...props}
64
64
  style={[{ flex: 1 }, (props as any).style]}
65
- className={cn("flex-1 bg-background", className)}
65
+ className={cn("flex-1 bg-neutral-50 dark:bg-neutral-950", className)}
66
66
  contentContainerStyle={{ paddingBottom: 40 }}
67
67
  showsVerticalScrollIndicator={false}
68
68
  >
69
69
  <View className="px-6 pt-6 gap-6">
70
- <Heading level={2} className="text-2xl font-bold text-foreground">
70
+ <Heading level={2} className="text-2xl font-bold text-neutral-900 dark:text-neutral-50">
71
71
  Settings & Profile
72
72
  </Heading>
73
73
 
@@ -79,14 +79,14 @@ export const SettingsTemplate: React.FC<SettingsTemplateProps> = ({
79
79
  </Avatar>
80
80
  <View className="flex-1">
81
81
  <View className="flex-row items-center gap-2">
82
- <Text className="text-base font-bold text-foreground">{user.name}</Text>
82
+ <Text className="text-base font-bold text-neutral-900 dark:text-neutral-100">{user.name}</Text>
83
83
  {user.plan && (
84
84
  <Badge variant="primary" size="sm">
85
85
  {user.plan}
86
86
  </Badge>
87
87
  )}
88
88
  </View>
89
- <Text className="text-xs text-muted">{user.email}</Text>
89
+ <Text className="text-xs text-neutral-500 dark:text-neutral-400">{user.email}</Text>
90
90
  </View>
91
91
  {onEditProfile && (
92
92
  <Button variant="outline" size="sm" onPress={onEditProfile}>
@@ -97,16 +97,16 @@ export const SettingsTemplate: React.FC<SettingsTemplateProps> = ({
97
97
 
98
98
  {/* Preferences Section */}
99
99
  <View className="gap-2">
100
- <Text className="text-xs font-bold text-muted uppercase tracking-wider px-1">
100
+ <Text className="text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-wider px-1">
101
101
  Preferences
102
102
  </Text>
103
- <Card className="divide-y divide-border/50">
103
+ <Card className="divide-y divide-neutral-200 dark:divide-neutral-800">
104
104
  <View className="p-4 flex-row items-center justify-between">
105
105
  <View className="pr-4 flex-1">
106
- <Text className="text-sm font-semibold text-foreground">
106
+ <Text className="text-sm font-semibold text-neutral-900 dark:text-neutral-100">
107
107
  Push Notifications
108
108
  </Text>
109
- <Text className="text-xs text-muted">
109
+ <Text className="text-xs text-neutral-500 dark:text-neutral-400">
110
110
  Receive real-time alerts on your mobile device
111
111
  </Text>
112
112
  </View>
@@ -118,10 +118,10 @@ export const SettingsTemplate: React.FC<SettingsTemplateProps> = ({
118
118
 
119
119
  <View className="p-4 flex-row items-center justify-between">
120
120
  <View className="pr-4 flex-1">
121
- <Text className="text-sm font-semibold text-foreground">
121
+ <Text className="text-sm font-semibold text-neutral-900 dark:text-neutral-100">
122
122
  Email Notifications
123
123
  </Text>
124
- <Text className="text-xs text-muted">
124
+ <Text className="text-xs text-neutral-500 dark:text-neutral-400">
125
125
  Weekly digests and activity summaries
126
126
  </Text>
127
127
  </View>
@@ -133,8 +133,8 @@ export const SettingsTemplate: React.FC<SettingsTemplateProps> = ({
133
133
 
134
134
  <View className="p-4 flex-row items-center justify-between">
135
135
  <View className="pr-4 flex-1">
136
- <Text className="text-sm font-semibold text-foreground">Dark Theme</Text>
137
- <Text className="text-xs text-muted">
136
+ <Text className="text-sm font-semibold text-neutral-900 dark:text-neutral-100">Dark Theme</Text>
137
+ <Text className="text-xs text-neutral-500 dark:text-neutral-400">
138
138
  Enable high contrast dark mode appearance
139
139
  </Text>
140
140
  </View>
@@ -143,10 +143,10 @@ export const SettingsTemplate: React.FC<SettingsTemplateProps> = ({
143
143
 
144
144
  <View className="p-4 flex-row items-center justify-between">
145
145
  <View className="pr-4 flex-1">
146
- <Text className="text-sm font-semibold text-foreground">
146
+ <Text className="text-sm font-semibold text-neutral-900 dark:text-neutral-100">
147
147
  Biometric Login
148
148
  </Text>
149
- <Text className="text-xs text-muted">
149
+ <Text className="text-xs text-neutral-500 dark:text-neutral-400">
150
150
  Use Face ID or fingerprint to authenticate
151
151
  </Text>
152
152
  </View>
@@ -160,43 +160,43 @@ export const SettingsTemplate: React.FC<SettingsTemplateProps> = ({
160
160
 
161
161
  {/* Security & Account Links */}
162
162
  <View className="gap-2">
163
- <Text className="text-xs font-bold text-muted uppercase tracking-wider px-1">
163
+ <Text className="text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-wider px-1">
164
164
  Account & Security
165
165
  </Text>
166
- <Card className="divide-y divide-border/50">
166
+ <Card className="divide-y divide-neutral-200 dark:divide-neutral-800">
167
167
  {onChangePassword && (
168
168
  <Pressable
169
169
  onPress={onChangePassword}
170
- className="p-4 flex-row items-center justify-between active:bg-muted/10"
170
+ className="p-4 flex-row items-center justify-between active:bg-neutral-100 dark:active:bg-neutral-800"
171
171
  >
172
- <Text className="text-sm font-semibold text-foreground">
172
+ <Text className="text-sm font-semibold text-neutral-900 dark:text-neutral-100">
173
173
  Change Password
174
174
  </Text>
175
- <Text className="text-muted text-xs">›</Text>
175
+ <Text className="text-neutral-400 dark:text-neutral-500 text-xs">›</Text>
176
176
  </Pressable>
177
177
  )}
178
178
 
179
179
  {onViewTerms && (
180
180
  <Pressable
181
181
  onPress={onViewTerms}
182
- className="p-4 flex-row items-center justify-between active:bg-muted/10"
182
+ className="p-4 flex-row items-center justify-between active:bg-neutral-100 dark:active:bg-neutral-800"
183
183
  >
184
- <Text className="text-sm font-semibold text-foreground">
184
+ <Text className="text-sm font-semibold text-neutral-900 dark:text-neutral-100">
185
185
  Terms of Service
186
186
  </Text>
187
- <Text className="text-muted text-xs">›</Text>
187
+ <Text className="text-neutral-400 dark:text-neutral-500 text-xs">›</Text>
188
188
  </Pressable>
189
189
  )}
190
190
 
191
191
  {onViewPrivacy && (
192
192
  <Pressable
193
193
  onPress={onViewPrivacy}
194
- className="p-4 flex-row items-center justify-between active:bg-muted/10"
194
+ className="p-4 flex-row items-center justify-between active:bg-neutral-100 dark:active:bg-neutral-800"
195
195
  >
196
- <Text className="text-sm font-semibold text-foreground">
196
+ <Text className="text-sm font-semibold text-neutral-900 dark:text-neutral-100">
197
197
  Privacy Policy
198
198
  </Text>
199
- <Text className="text-muted text-xs">›</Text>
199
+ <Text className="text-neutral-400 dark:text-neutral-500 text-xs">›</Text>
200
200
  </Pressable>
201
201
  )}
202
202
  </Card>