feat(mobile): refine TREK navigation and interfaces

This commit is contained in:
Maurice
2026-12-03 23:06:17 +01:00
parent 995e9c435f
commit 00955f0ac5
553 changed files with 17703 additions and 13101 deletions
@@ -9,6 +9,7 @@ import { type DateField, dateFieldOrder, dateLayout, formatDisplayDate } from '.
import { useDateFormat } from '../../hooks/useDateFormat';
import { useRemeasureSignal } from '../../hooks/useAnchoredPosition';
import { useWeekStartDay } from '../../hooks/useWeekStartDay';
import { useOverlay } from '../../hooks/overlayStack';
import { leadingBlanks, weekdayLabels } from '../../utils/calendarWeek';
import { selectionHaptic } from '../../native/haptics';
@@ -33,6 +34,7 @@ interface CustomDatePickerProps {
max?: string;
/** What the field is, for a picker without a visible label around it; the trigger reads it with its date. */
ariaLabel?: string;
clearLabel?: string;
}
export function CustomDatePicker({
@@ -46,6 +48,7 @@ export function CustomDatePicker({
min,
max,
ariaLabel,
clearLabel,
}: CustomDatePickerProps) {
const { locale, t } = useTranslation();
const weekStart = useWeekStartDay();
@@ -203,6 +206,7 @@ export function CustomDatePicker({
const [textInput, setTextInput] = useState('');
const [isTyping, setIsTyping] = useState(false);
useOverlay(open || isTyping, () => { setOpen(false); setIsTyping(false); }, true);
const handleTextSubmit = () => {
setIsTyping(false);
@@ -677,7 +681,7 @@ export function CustomDatePicker({
onChange('');
setOpen(false);
}}
aria-label={t('common.datepicker.clearDate')}
aria-label={clearLabel ?? t('common.datepicker.clearDate')}
style={{
background: 'none',
border: 'none',