Update icons with pointerEvents="none" and upgrade lucide-react-native to v0.563.0

This commit is contained in:
2026-02-17 10:22:18 +01:00
parent cded5e8f00
commit 68e25fac71
27 changed files with 106 additions and 128 deletions

View File

@@ -88,7 +88,7 @@ export default function AddDocumentModal({ visible, onClose, onUpload, isUploadi
<View className="flex-row justify-between items-center mb-6">
<Text className="text-xl font-bold text-gray-800">Carica Documento</Text>
<TouchableOpacity onPress={onClose} className="p-2 bg-gray-50 rounded-full">
<X size={20} color="#374151" />
<X size={20} color="#374151" pointerEvents="none" />
</TouchableOpacity>
</View>
@@ -100,7 +100,7 @@ export default function AddDocumentModal({ visible, onClose, onUpload, isUploadi
className="h-64 border-2 border-dashed border-gray-300 rounded-2xl items-center justify-center bg-gray-50 active:bg-gray-100"
>
<View className="bg-white p-4 rounded-full shadow-sm mb-3">
<Upload size={32} color="#099499" />
<Upload size={32} color="#099499" pointerEvents="none" />
</View>
<Text className="text-lg text-gray-600 font-medium">Tocca per selezionare un file</Text>
<Text className="text-gray-400 text-sm mt-1">PDF, Immagini, Word</Text>
@@ -109,7 +109,7 @@ export default function AddDocumentModal({ visible, onClose, onUpload, isUploadi
// Selected File View
<View className="bg-[#E6F4F4] p-4 rounded-2xl border border-[#099499]/20 flex-row items-center gap-4">
<View className="bg-white p-3 rounded-xl">
<FileText size={24} color="#099499" />
<FileText size={24} color="#099499" pointerEvents="none" />
</View>
<View className="flex-1">
<Text className="text-gray-800 font-bold text-base" numberOfLines={1}>
@@ -120,7 +120,7 @@ export default function AddDocumentModal({ visible, onClose, onUpload, isUploadi
</Text>
</View>
<TouchableOpacity onPress={removeFile} className="p-2 bg-white rounded-lg">
<Trash2 size={18} color="#ef4444" />
<Trash2 size={18} color="#ef4444" pointerEvents="none" />
</TouchableOpacity>
</View>
)}
@@ -163,7 +163,7 @@ export default function AddDocumentModal({ visible, onClose, onUpload, isUploadi
<ActivityIndicator color="white" />
) : (
<>
<Upload size={20} color="white" />
<Upload size={20} color="white" pointerEvents="none" />
<Text className="text-white font-bold text-base">Carica</Text>
</>
)}

View File

@@ -81,7 +81,7 @@ export const AlertProvider = ({ children }: { children: ReactNode }) => {
{/* Icon Circle */}
<View className={`${bgColor} p-4 rounded-full mb-4`}>
<Icon size={32} className={color} strokeWidth={2.5} />
<Icon size={32} className={color} strokeWidth={2.5} pointerEvents="none" />
</View>
{/* Texts */}

View File

@@ -12,8 +12,8 @@ export const AppDatePicker = (props: AppDatePickerProps) => {
{...props}
locale="it"
components={{
IconPrev: <ChevronLeft size={24} color="#1f2937" />,
IconNext: <ChevronRight size={24} color="#1f2937" />,
IconPrev: <ChevronLeft size={24} color="#1f2937" pointerEvents="none" />,
IconNext: <ChevronRight size={24} color="#1f2937" pointerEvents="none" />,
...props.components,
}}
styles={{

View File

@@ -57,7 +57,7 @@ export default function CalendarWidget({ events, types, onMonthChange }: Calenda
onPress={() => changeMonth(-1)}
className="p-2 bg-gray-50 rounded-full"
>
<ChevronLeft size={24} color="#374151" />
<ChevronLeft size={24} color="#374151" pointerEvents="none" />
</TouchableOpacity>
<Text className="text-xl font-bold text-gray-800 capitalize">
{currentDate.toLocaleString('it-IT', { month: 'long', year: 'numeric' })}
@@ -66,7 +66,7 @@ export default function CalendarWidget({ events, types, onMonthChange }: Calenda
onPress={() => changeMonth(1)}
className="p-2 bg-gray-50 rounded-full"
>
<ChevronRight size={24} color="#374151" />
<ChevronRight size={24} color="#374151" pointerEvents="none" />
</TouchableOpacity>
</View>

View File

@@ -10,21 +10,21 @@ const DeviceCard = ({ device, onToggle }: { device: HaEntity; onToggle: (entityI
switch (domain) {
case 'light':
return <Lightbulb size={32} color="#f59e0b" />;
return <Lightbulb size={32} color="#f59e0b" pointerEvents="none" />;
case 'switch':
return <Power size={32} color="#3b82f6" />;
return <Power size={32} color="#3b82f6" pointerEvents="none" />;
case 'sensor':
return <Cpu size={32} color="#ef4444" />;
return <Cpu size={32} color="#ef4444" pointerEvents="none" />;
case 'lock':
return <Lock size={32} color="#10b981" />;
return <Lock size={32} color="#10b981" pointerEvents="none" />;
case 'fan':
return <Fan size={32} color="#6b7280" />;
return <Fan size={32} color="#6b7280" pointerEvents="none" />;
case 'camera':
return <Cctv size={32} color="#8b5cf6" />;
return <Cctv size={32} color="#8b5cf6" pointerEvents="none" />;
case 'weather':
return <CloudSun size={32} color="#3b82f6" />;
return <CloudSun size={32} color="#3b82f6" pointerEvents="none" />;
default:
return <Zap size={32} color="#8b5cf6" />;
return <Zap size={32} color="#8b5cf6" pointerEvents="none" />;
}
};

View File

@@ -112,7 +112,7 @@ export default function NfcScanModal({ visible, onClose, onScan }: NfcScanModalP
onPress={onClose}
className="absolute top-6 right-6 z-10 p-2 bg-gray-50 rounded-full"
>
<X size={20} color="#9ca3af" />
<X size={20} color="#9ca3af" pointerEvents="none" />
</TouchableOpacity>
{/* NFC Animated Area */}
@@ -132,7 +132,7 @@ export default function NfcScanModal({ visible, onClose, onScan }: NfcScanModalP
{/* Fixed Circle (Foreground) */}
<View className="bg-[#E6F4F4] p-6 rounded-full border-4 border-white shadow-sm z-10">
<SmartphoneNfc size={64} color="#099499" />
<SmartphoneNfc size={64} color="#099499" pointerEvents="none" />
</View>
</View>
@@ -147,7 +147,7 @@ export default function NfcScanModal({ visible, onClose, onScan }: NfcScanModalP
{/* Indicator (Wave Simulation) */}
<View className="flex-row gap-2 mt-8 items-center opacity-60">
<Radio size={20} color="#099499" />
<Radio size={20} color="#099499" pointerEvents="none" />
<Text className="text-[#099499] font-medium text-sm uppercase tracking-widest">
Ricerca in corso...
</Text>

View File

@@ -14,7 +14,7 @@ export default function OfflineScreen({ onRetry, isRetrying = false }: OfflineSc
<View className="flex-1 items-center justify-center px-8">
{/* Icon */}
<View className="bg-gray-100 p-6 rounded-full mb-6">
<WifiOff size={64} className="text-gray-400" />
<WifiOff size={64} className="text-gray-400" pointerEvents="none" />
</View>
<Text className="text-2xl font-bold text-gray-800 mb-2 text-center">

View File

@@ -80,14 +80,14 @@ export default function QrScanModal({ visible, onClose, onScan }: QrScanModalPro
<View className="absolute bottom-0 right-0 w-6 h-6 border-r-4 border-b-4 border-[#099499]" />
{/* Animated Scan Line or Icon */}
{!scanned && <ScanLine color="#099499" size={40} className="opacity-50" />}
{!scanned && <ScanLine color="#099499" size={40} className="opacity-50" pointerEvents="none" />}
</View>
</View>
{/* Footer Overlay */}
<View className="items-center justify-end pb-12">
<TouchableOpacity onPress={onClose} className="bg-white/20 p-4 rounded-full">
<X color="white" size={32} />
<X color="white" size={32} pointerEvents="none" />
</TouchableOpacity>
<Text className="text-white mt-4 font-medium">Chiudi</Text>
</View>

View File

@@ -28,7 +28,7 @@ export const RangePickerModal = ({ visible, onClose, onApply }: any) => {
<View className="flex-row justify-between items-center mb-4">
<Text className="text-xl font-bold text-gray-800">Seleziona Periodo</Text>
<TouchableOpacity onPress={onClose} className="p-2 bg-gray-50 rounded-full">
<X size={20} color="#4b5563" />
<X size={20} color="#4b5563" pointerEvents="none" />
</TouchableOpacity>
</View>
@@ -49,7 +49,7 @@ export const RangePickerModal = ({ visible, onClose, onApply }: any) => {
}}
className="mt-6 bg-[#099499] rounded-xl py-4 flex-row justify-center items-center active:bg-[#077d82]"
>
<Check size={20} color="white" className="mr-2" />
<Check size={20} color="white" className="mr-2" pointerEvents="none" />
<Text className="text-white font-bold text-lg ml-2">Applica Filtro</Text>
</TouchableOpacity>
<TouchableOpacity

View File

@@ -112,7 +112,7 @@ export default function RequestPermitModal({ visible, types, onClose, onSubmit }
<View className="flex-row justify-between items-center mb-6">
<Text className="text-2xl font-bold text-gray-800">Nuova Richiesta</Text>
<TouchableOpacity onPress={onClose} className="p-2 bg-gray-100 rounded-full">
<X size={24} color="#4b5563" />
<X size={24} color="#4b5563" pointerEvents="none" />
</TouchableOpacity>
</View>

View File

@@ -40,7 +40,7 @@ export const TimePickerModal = ({ visible, initialDate, title, onConfirm, onClos
<View className="flex-row justify-between items-center mb-4">
<Text className="text-lg font-bold text-gray-800">{title}</Text>
<TouchableOpacity onPress={onClose} className="p-2 bg-gray-100 rounded-full">
<X size={20} color="#4b5563" />
<X size={20} color="#4b5563" pointerEvents="none" />
</TouchableOpacity>
</View>