To create new input type (widget) just have a look on sources in inputs directory.
All inputs a derived from
abstract.js, code is commented.
I'm very often asked how to create complex widgets like address input:
Please consider, that x-editable main power is quick edit of single value that is stored in single database field.
If you want to have full featured form with several fields, just render it in hidden DIV and display by click. You don't need x-editable for that.