11( function webpackUniversalModuleDefinition ( root , factory ) {
22 if ( typeof exports === 'object' && typeof module === 'object' )
3- module . exports = factory ( require ( "React" ) , require ( "update" ) ) ;
3+ module . exports = factory ( require ( "React" ) ) ;
44 else if ( typeof define === 'function' && define . amd )
5- define ( [ "React" , "update" ] , factory ) ;
5+ define ( [ "React" ] , factory ) ;
66 else if ( typeof exports === 'object' )
7- exports [ "Tags" ] = factory ( require ( "React" ) , require ( "update" ) ) ;
7+ exports [ "Tags" ] = factory ( require ( "React" ) ) ;
88 else
9- root [ "Tags" ] = factory ( root [ "React" ] , root [ "update" ] ) ;
10- } ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_1__ , __WEBPACK_EXTERNAL_MODULE_2__ ) {
9+ root [ "Tags" ] = factory ( root [ "React" ] ) ;
10+ } ) ( this , function ( __WEBPACK_EXTERNAL_MODULE_1__ ) {
1111return /******/ ( function ( modules ) { // webpackBootstrap
1212/******/ // The module cache
1313/******/ var installedModules = { } ;
@@ -66,16 +66,14 @@ return /******/ (function(modules) { // webpackBootstrap
6666
6767 var _react2 = _interopRequireDefault ( _react ) ;
6868
69- var _reactAddonsUpdate = __webpack_require__ ( 2 ) ;
70-
71- var _reactAddonsUpdate2 = _interopRequireDefault ( _reactAddonsUpdate ) ;
72-
73- var _Tag = __webpack_require__ ( 3 ) ;
69+ var _Tag = __webpack_require__ ( 2 ) ;
7470
7571 var _Tag2 = _interopRequireDefault ( _Tag ) ;
7672
7773 function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
7874
75+ function _toConsumableArray ( arr ) { if ( Array . isArray ( arr ) ) { for ( var i = 0 , arr2 = Array ( arr . length ) ; i < arr . length ; i ++ ) { arr2 [ i ] = arr [ i ] ; } return arr2 ; } else { return Array . from ( arr ) ; } }
76+
7977 function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
8078
8179 function _possibleConstructorReturn ( self , call ) { if ( ! self ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return call && ( typeof call === "object" || typeof call === "function" ) ? call : self ; }
@@ -106,10 +104,10 @@ return /******/ (function(modules) { // webpackBootstrap
106104 if ( this . state . tags . length >= this . props . maxTags ) return ;
107105 }
108106
109- var _props = this . props ;
110- var uniqueTags = _props . uniqueTags ;
111- var onChange = _props . onChange ;
112- var onAdded = _props . onAdded ;
107+ var _props = this . props ,
108+ uniqueTags = _props . uniqueTags ,
109+ onChange = _props . onChange ,
110+ onAdded = _props . onAdded ;
113111
114112
115113 var value = this . input . value . trim ( ) ;
@@ -119,7 +117,7 @@ return /******/ (function(modules) { // webpackBootstrap
119117 }
120118
121119 this . setState ( {
122- tags : ( 0 , _reactAddonsUpdate2 . default ) ( this . state . tags , { $push : [ value ] } )
120+ tags : [ ] . concat ( _toConsumableArray ( this . state . tags ) , [ value ] )
123121 } , function ( ) {
124122 if ( typeof onChange !== 'undefined' ) {
125123 onChange ( _this2 . state . tags ) ;
@@ -137,14 +135,16 @@ return /******/ (function(modules) { // webpackBootstrap
137135 value : function removeTag ( index ) {
138136 var _this3 = this ;
139137
140- var _props2 = this . props ;
141- var onChange = _props2 . onChange ;
142- var onRemoved = _props2 . onRemoved ;
138+ var _props2 = this . props ,
139+ onChange = _props2 . onChange ,
140+ onRemoved = _props2 . onRemoved ;
143141
144142 var value = this . state . tags [ index ] ;
145143
146144 this . setState ( {
147- tags : ( 0 , _reactAddonsUpdate2 . default ) ( this . state . tags , { $splice : [ [ index , 1 ] ] } )
145+ tags : this . state . tags . filter ( function ( _ , i ) {
146+ return i !== index ;
147+ } )
148148 } , function ( ) {
149149 if ( typeof onChange !== 'undefined' ) {
150150 onChange ( _this3 . state . tags ) ;
@@ -200,11 +200,11 @@ return /******/ (function(modules) { // webpackBootstrap
200200 value : function render ( ) {
201201 var _this4 = this ;
202202
203- var _props3 = this . props ;
204- var readOnly = _props3 . readOnly ;
205- var removeTagIcon = _props3 . removeTagIcon ;
206- var placeholder = _props3 . placeholder ;
207- var id = _props3 . id ;
203+ var _props3 = this . props ,
204+ readOnly = _props3 . readOnly ,
205+ removeTagIcon = _props3 . removeTagIcon ,
206+ placeholder = _props3 . placeholder ,
207+ id = _props3 . id ;
208208
209209
210210 var tagItems = this . state . tags . map ( function ( tag , v ) {
@@ -219,6 +219,7 @@ return /******/ (function(modules) { // webpackBootstrap
219219 var tagInput = ! this . props . readOnly ? _react2 . default . createElement ( 'input' , {
220220 type : 'text' ,
221221 role : 'textbox' ,
222+ autoComplete : 'off' ,
222223 'aria-label' : placeholder ,
223224 placeholder : placeholder ,
224225 onChange : this . onInputChange . bind ( this ) ,
@@ -227,7 +228,7 @@ return /******/ (function(modules) { // webpackBootstrap
227228 return _this4 . input = el ;
228229 } } ) : null ;
229230
230- var classNames = readOnly ? 'tags-container readonly ' : 'tags-container ' ;
231+ var classNames = readOnly ? 'react-tags__container react-tags__container_readonly ' : 'react-tags__container ' ;
231232
232233 return _react2 . default . createElement (
233234 'div' ,
@@ -254,18 +255,18 @@ return /******/ (function(modules) { // webpackBootstrap
254255 right : 39
255256 } ;
256257 Tags . propTypes = {
257- initialTags : _react2 . default . PropTypes . arrayOf ( _react2 . default . PropTypes . string ) ,
258- onChange : _react2 . default . PropTypes . func ,
259- onAdded : _react2 . default . PropTypes . func ,
260- onRemoved : _react2 . default . PropTypes . func ,
261- onInputChange : _react2 . default . PropTypes . func ,
262- maxTags : _react2 . default . PropTypes . number ,
263- placeholder : _react2 . default . PropTypes . string ,
264- addKeys : _react2 . default . PropTypes . arrayOf ( _react2 . default . PropTypes . number ) ,
265- id : _react2 . default . PropTypes . string ,
266- readOnly : _react2 . default . PropTypes . bool ,
267- uniqueTags : _react2 . default . PropTypes . bool ,
268- removeTagIcon : _react2 . default . PropTypes . oneOfType ( [ _react2 . default . PropTypes . string , _react2 . default . PropTypes . element ] )
258+ initialTags : _react . PropTypes . arrayOf ( _react . PropTypes . string ) ,
259+ onChange : _react . PropTypes . func ,
260+ onAdded : _react . PropTypes . func ,
261+ onRemoved : _react . PropTypes . func ,
262+ onInputChange : _react . PropTypes . func ,
263+ maxTags : _react . PropTypes . number ,
264+ placeholder : _react . PropTypes . string ,
265+ addKeys : _react . PropTypes . arrayOf ( _react . PropTypes . number ) ,
266+ id : _react . PropTypes . string ,
267+ readOnly : _react . PropTypes . bool ,
268+ uniqueTags : _react . PropTypes . bool ,
269+ removeTagIcon : _react . PropTypes . oneOfType ( [ _react . PropTypes . string , _react . PropTypes . element ] )
269270 } ;
270271 Tags . defaultProps = {
271272 initialTags : [ ] ,
@@ -285,12 +286,6 @@ return /******/ (function(modules) { // webpackBootstrap
285286
286287/***/ } ,
287288/* 2 */
288- /***/ function ( module , exports ) {
289-
290- module . exports = __WEBPACK_EXTERNAL_MODULE_2__ ;
291-
292- /***/ } ,
293- /* 3 */
294289/***/ function ( module , exports , __webpack_require__ ) {
295290
296291 'use strict' ;
0 commit comments