feat(typeahead): anchor popup left or right of input

For issue #1376