aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/components
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-08-20 15:57:34 +0300
committerGitHub <noreply@github.com>2025-08-20 13:57:34 +0100
commitdd53ccb9624e719d019a8fe29fcd66415c1b1528 (patch)
tree5788b06d4280248cf0c0f837318b0722f6d4cdd7 /apps/mobile/components
parent5f07b5075dd45b4b0f4ab35ee70412f11177eff4 (diff)
downloadkarakeep-dd53ccb9624e719d019a8fe29fcd66415c1b1528.tar.zst
deps: Upgrade expo & nextjs to react 19 (#1565)
* Attempt to upgrade expo 53 * Attempt upgrade nextjs * Fix a bunch of peer deps * upgrade some docs deps * fix typecheck * update the shadcn calendar component * more fixes * more fixes * revert ollama upgrade * update react version to use carets * remove react-select from landing * fix the typescript error caused by customFetch * upgrade the new grid user setting to nextjs 15 * mobile: enable react canary to support react 19.1 * upgrade react native menu * fix navigation context error
Diffstat (limited to 'apps/mobile/components')
-rw-r--r--apps/mobile/components/ui/Input.tsx61
1 files changed, 30 insertions, 31 deletions
diff --git a/apps/mobile/components/ui/Input.tsx b/apps/mobile/components/ui/Input.tsx
index dc84f54f..2bd5e190 100644
--- a/apps/mobile/components/ui/Input.tsx
+++ b/apps/mobile/components/ui/Input.tsx
@@ -1,47 +1,46 @@
+import type { TextInputProps } from "react-native";
import { forwardRef } from "react";
import { ActivityIndicator, Text, TextInput, View } from "react-native";
import { cn } from "@/lib/utils";
import { TailwindResolver } from "../TailwindResolver";
-export interface InputProps
- extends React.ComponentPropsWithoutRef<typeof TextInput> {
+export interface InputProps extends TextInputProps {
label?: string;
labelClasses?: string;
inputClasses?: string;
+ loading?: boolean;
}
-const Input = forwardRef<
- React.ElementRef<typeof TextInput>,
- InputProps & { loading?: boolean }
->(
+export const Input = forwardRef<TextInput, InputProps>(
(
{ className, label, labelClasses, inputClasses, loading, ...props },
ref,
- ) => (
- <View className={cn("flex flex-col gap-1.5", className)}>
- {label && <Text className={cn("text-base", labelClasses)}>{label}</Text>}
- <TailwindResolver
- className="text-gray-400"
- comp={(styles) => (
- <TextInput
- placeholderTextColor={styles?.color?.toString()}
- ref={ref}
- className={cn(
- "bg-background text-foreground",
- inputClasses,
- "rounded-lg border border-input px-4 py-2.5",
- )}
- {...props}
- />
+ ) => {
+ return (
+ <View className={cn("flex flex-col gap-1.5", className)}>
+ {label && (
+ <Text className={cn("text-base", labelClasses)}>{label}</Text>
)}
- />
- {loading && (
- <ActivityIndicator className="absolute bottom-0 right-0 p-2" />
- )}
- </View>
- ),
+ <TailwindResolver
+ className="text-gray-400"
+ comp={(styles) => (
+ <TextInput
+ ref={ref}
+ placeholderTextColor={styles?.color?.toString()}
+ className={cn(
+ "bg-background text-foreground",
+ inputClasses,
+ "rounded-lg border border-input px-4 py-2.5",
+ )}
+ {...props}
+ />
+ )}
+ />
+ {loading && (
+ <ActivityIndicator className="absolute bottom-0 right-0 p-2" />
+ )}
+ </View>
+ );
+ },
);
-Input.displayName = "Input";
-
-export { Input };