Mixins / foldkit-mixins-ui
PopoverSlots
const · packages/mixins-ui/src/popover.ts:21
const PopoverSlots: Slots.Contract<{
readonly button: Slot.UnnamedSlot<
Capability.Capability<
'Interactive',
readonly [Capability.Capability<'Base', readonly []>]
>,
readonly [Event.EventToken<'click'>],
readonly [
Attr.AttrToken<'role'>,
Attr.AttrToken<'aria-expanded'>,
Attr.AttrToken<'aria-disabled'>,
Attr.AttrToken<'disabled'>,
],
readonly Slot.RequirementName[],
boolean
>
readonly layer: 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 panel: Slot.UnnamedSlot<
Capability.Capability<
'Container',
readonly [
Capability.Capability<
'Interactive',
readonly [Capability.Capability<'Base', readonly []>]
>,
]
>,
readonly [Event.EventToken<'blur'>],
readonly Slot.AttributeName[],
readonly Slot.RequirementName[],
boolean
>
readonly backdrop: Slot.UnnamedSlot<
Capability.Capability<
'Container',
readonly [
Capability.Capability<
'Interactive',
readonly [Capability.Capability<'Base', readonly []>]
>,
]
>,
readonly [Event.EventToken<'click'>],
readonly Slot.AttributeName[],
readonly Slot.RequirementName[],
boolean
>
readonly arrow: Slot.UnnamedSlot<
Capability.Capability<
'Container',
readonly [
Capability.Capability<
'Interactive',
readonly [Capability.Capability<'Base', readonly []>]
>,
]
>,
readonly Slot.EventName[],
readonly Slot.AttributeName[],
readonly Slot.RequirementName[],
boolean
>
}>Popover is a Submodel; every bundle is a ChildAttribute group. button
owns click (and its pointer/keyboard handlers) while open; panel owns
blur; backdrop owns click. The panel and backdrop bundles also carry
the anchor and portal Mounts, preserved as opaque ChildAttributes.
layer is this package's: drawn around the panel, it shows the panel in
the browser's top layer (Anchor.layer), above every stacking context and
outside every overflow box, with the anchor placing it as before. Draw
the panel without a portal (portal: false, as anchor gives), or the
portal takes it out of the layer. arrow is upstream's: drawn as the
panel's child, it points at the trigger from --arrow-x and --arrow-y.
In the guides
- Mechanisms shared by many widgetsMixins / foldkit-mixins-ui