@urbicon-ui/blocks 6.32.0 → 6.33.0

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.
@@ -62,14 +62,18 @@
62
62
  const agendaKey = $derived(`${ctx.displayedYear}-${ctx.displayedMonth}`);
63
63
 
64
64
  function handleKeydown(e: KeyboardEvent) {
65
+ // Direction-gated like the swipes and header arrows (the DateGridScaffold
66
+ // pattern): an arrow key at the bound is inert — no navDirection flip, no
67
+ // clamped no-op onMonthChange emit. Disabled calendars ignore keys entirely.
68
+ if (ctx.disabled) return;
65
69
  switch (e.key) {
66
70
  case 'ArrowLeft':
67
71
  e.preventDefault();
68
- ctx.navigate(-1);
72
+ if (ctx.canGoBack) ctx.navigate(-1);
69
73
  break;
70
74
  case 'ArrowRight':
71
75
  e.preventDefault();
72
- ctx.navigate(1);
76
+ if (ctx.canGoForward) ctx.navigate(1);
73
77
  break;
74
78
  }
75
79
  }
@@ -33,14 +33,18 @@
33
33
  const totalEventCount = $derived(eventsWithInfo.length);
34
34
 
35
35
  function handleKeydown(e: KeyboardEvent) {
36
+ // Direction-gated like the swipes and header arrows (the DateGridScaffold
37
+ // pattern): an arrow key at the bound is inert — no navDirection flip, no
38
+ // clamped no-op onDayChange emit. Disabled calendars ignore keys entirely.
39
+ if (ctx.disabled) return;
36
40
  switch (e.key) {
37
41
  case 'ArrowLeft':
38
42
  e.preventDefault();
39
- ctx.navigate(-1);
43
+ if (ctx.canGoBack) ctx.navigate(-1);
40
44
  break;
41
45
  case 'ArrowRight':
42
46
  e.preventDefault();
43
- ctx.navigate(1);
47
+ if (ctx.canGoForward) ctx.navigate(1);
44
48
  break;
45
49
  }
46
50
  }