JSFiddle - React, Tailwind, and code Playground

by cleaver

HTML

<link rel="stylesheet" href="https://raw.githubusercontent.com/tomik23/autocomplete/master/docs/css/autocomplete.css">
<div class="auto-search">
  <input type="text" id="basic" placeholder="type w">
</div>

JavaScript

var Autocomplete=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function s(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return n(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,n=new Array(e);s<e;s++)n[s]=t[s];return n}return function n(o,i){var r,a=this,c=i.delay,l=void 0===c?500:c,u=i.clearButton,d=void 0===u||u,h=i.howManyCharacters,m=void 0===h?1:h,f=i.selectFirst,v=void 0!==f&&f,p=i.insertToInput,L=void 0!==p&&p,y=i.cache,A=void 0!==y&&y,b=i.disableCloseOnSelect,x=void 0!==b&&b,g=i.classGroup,S=i.onResults,C=void 0===S?function(){}:S,E=i.onSearch,I=void 0===E?function(){}:E,T=i.onSubmit,k=void 0===T?function(){}:T,O=i.onOpened,w=void 0===O?function(){}:O,B=i.onReset,D=void 0===B?function(){}:B,F=i.onClose,R=void 0===F?function(){}:F,j=i.noResults,N=void 0===j?function(){}:j,G=i.onSelectedItem,M=void 0===G?function(){}:G;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a...