Mixins / foldkit-mixins-ui

DialogContext

interface · packages/mixins-ui/src/dialog.ts:75

interface DialogContext<Input, Message> extends ResolveContext<Input, Message> {
  readonly role?: 'dialog' | 'alertdialog'
  readonly covered?: boolean
  readonly attributes?: {
    readonly [K in keyof typeof DialogSlots]?: SlotAttributes<Message>
  }
}

Members

DialogContext.role

property · packages/mixins-ui/src/dialog.ts:82

readonly role?: 'dialog' | 'alertdialog'

'alertdialog', the APG's alert dialog, asks for an answer: its dialog bundle carries role="alertdialog", and the application draws no close button and drops the Messages isDismissal names. 'dialog', the default, writes no role: the <dialog> element already has it.

DialogContext.covered

property · packages/mixins-ui/src/dialog.ts:87

readonly covered?: boolean

Whether a dialog opened from this one is above it, as Base UI's nested dialogs: the panel carries data-covered, and the recipe steps it back.

DialogContext.attributes

property · packages/mixins-ui/src/dialog.ts:92

readonly attributes?: {
  readonly [K in keyof typeof DialogSlots]?: SlotAttributes<Message>
}

Attributes added to a bundle before the mixins resolve, as the Sheet adds its drag to the panel and the handle.