refactor(dialog): use interimElement

Closes #305. Closes #336. Closes #278.