export interface FocusEventProps { /** * Callback when the element loses focus. */ onBlur?: () => void; /** * Callback when the element receives focus. */ onFocus?: () => void; } export interface ToggleEventProps { /** * Callback fired when the element state changes **after** any animations have finished. * * - If the element transitioned from hidden to showing, the `oldState` property will be set to `closed` and the * `newState` property will be set to `open`. * - If the element transitioned from showing to hidden, the `oldState` property will be set to `open` and the * `newState` will be `closed`. * * @see https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/newState * @see https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/oldState */ onAfterToggle?: (oldState: ToggleState, newState: ToggleState) => void; /** * Callback straight after the element state changes. * * - If the element is transitioning from hidden to showing, the `oldState` property will be set to `closed` and the * `newState` property will be set to `open`. * - If the element is transitioning from showing to hidden, then `oldState` property will be set to `open` and the * `newState` will be `closed`. * * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/toggle_event * @see https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/newState * @see https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/oldState */ onToggle?: (oldState: ToggleState, newState: ToggleState) => void; } type ToggleState = 'open' | 'closed'; export {};