Mixins / foldkit-mixins-ui

CalendarSlots

const · packages/mixins-ui/src/calendar.ts:84

const CalendarSlots: Slots.Contract<{ readonly root: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly header: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly heading: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly previousMonthButton: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly [Event.EventToken<"click">], readonly [Attr.AttrToken<"role">, Attr.AttrToken<"disabled">, Attr.AttrToken<"aria-disabled">], readonly Slot.RequirementName[], boolean>; readonly nextMonthButton: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly [Event.EventToken<"click">], readonly [Attr.AttrToken<"role">, Attr.AttrToken<"disabled">, Attr.AttrToken<"aria-disabled">], readonly Slot.RequirementName[], boolean>; readonly headingButton: Slot. …;

Calendar is a nested Submodel whose shape depends on model.viewMode. The top-level groups (root, grid, the navigation buttons) and per-item groups (columnHeaders[], weeks[].attributes, the day/month/year cells and their buttons) are each resolved with SlotView.buildersFor, so a contribution to a cell slot applies to every cell while each cell's base keeps its own event ownership (a disabled day omits OnClick). The rest are this package's, so the default drawing puts no markup outside a slot: header, the row of the heading and its paging buttons; heading, the month and year as text when the caption is a label; monthSelect and yearSelect, the caption's dropdowns; weekNumberHeader and weekNumber, a column of ISO week numbers; dayDetail, a line under a day's number, such as its price (detail); presets and preset, buttons that choose a whole selection (presetsView); and what view lays around the months: frame, the named group holding it all; body, the row of presets, months and aside; main, the months over the today button; months, the one or two month grids; todayButton; and aside and footer, which hold drawings the application gives.

In the guides