Add datetime components 196-215; Kit.At; inert stepper arrows

Calendars, date and time inputs, pickers, clocks, timers, a sun dial,
a season wheel, an agenda and a day schedule. Kit.At rebuilds at a
moment (relative times, midnight). Stepper and NumberInput arrows stop
under Inert. DateInput parks a popup focus as its own.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 23:56:10 -04:00
1 parent 5c3c883b7d
commit a2f2796455
38 files changed
+2651 -5

No files matched your search

+17
View File
@@ -194,3 +194,20 @@ func TestPopoverRefusesNegativeWidth(t *testing.T) {
overlay.Popover(c, "X", b.Element, &open, overlay.PopoverOptions{Width: -1}, func() {})
})
}
func TestPopconfirmParksFocusAsItTurnsOff(t *testing.T) {
disabled := false
tt := view(640, 400, newClock(), false, func(c *ui.Context) {
ui.Column(c).Padding(40).Children(func() {
overlay.Popconfirm(c, "SELL", "Sell?", overlay.PopconfirmOptions{Disabled: disabled})
pixel.Text(c, "elsewhere", pixel.TextOptions{})
})
})
click(t, tt, "SELL")
tt.Key(0, ui.KeyTab)
disabled = true
tt.Frame()
if tt.Focused("SELL") && !tt.Focused("elsewhere") {
t.Fatal("the focus came back to the button as it turned off")
}
}
+4 -1
View File
@@ -31,8 +31,11 @@ func Popconfirm(c *ui.Context, text, question string, o PopconfirmOptions) Popco
if b.Clicked {
*open = true
}
// A popup above a veil closes with its control.
// A popup above a veil closes with it, focus parked.
if o.Disabled || pixel.Current(c).Inert {
if *open {
c.Root().Focus()
}
*open = false
}
was := *open