@@ -13,7 +13,31 @@ var _classnames = _interopRequireDefault(require("classnames"));
1313
1414var _const = require ( "./const" ) ;
1515
16- var STYLES = _interopRequireWildcard ( {
16+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
17+
18+ function _interopRequireWildcard ( obj ) { if ( obj && obj . __esModule ) { return obj ; } else { var newObj = { } ; if ( obj != null ) { for ( var key in obj ) { if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) { var desc = Object . defineProperty && Object . getOwnPropertyDescriptor ? Object . getOwnPropertyDescriptor ( obj , key ) : { } ; if ( desc . get || desc . set ) { Object . defineProperty ( newObj , key , desc ) ; } else { newObj [ key ] = obj [ key ] ; } } } } newObj . default = obj ; return newObj ; } }
19+
20+ function _typeof ( obj ) { if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
21+
22+ function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
23+
24+ function _defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } }
25+
26+ function _createClass ( Constructor , protoProps , staticProps ) { if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) _defineProperties ( Constructor , staticProps ) ; return Constructor ; }
27+
28+ function _possibleConstructorReturn ( self , call ) { if ( call && ( _typeof ( call ) === "object" || typeof call === "function" ) ) { return call ; } return _assertThisInitialized ( self ) ; }
29+
30+ function _getPrototypeOf ( o ) { _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) { return o . __proto__ || Object . getPrototypeOf ( o ) ; } ; return _getPrototypeOf ( o ) ; }
31+
32+ function _inherits ( subClass , superClass ) { if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function" ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , writable : true , configurable : true } } ) ; if ( superClass ) _setPrototypeOf ( subClass , superClass ) ; }
33+
34+ function _setPrototypeOf ( o , p ) { _setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) { o . __proto__ = p ; return o ; } ; return _setPrototypeOf ( o , p ) ; }
35+
36+ function _assertThisInitialized ( self ) { if ( self === void 0 ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return self ; }
37+
38+ function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
39+
40+ var reactInputsValidationCss = {
1741 "ellipsis" : "react-inputs-validation__ellipsis___3-Api" ,
1842 "textbox__wrapper" : "react-inputs-validation__textbox__wrapper___3tnXv" ,
1943 "textbox__container" : "react-inputs-validation__textbox__container___3KXOM" ,
@@ -51,32 +75,7 @@ var STYLES = _interopRequireWildcard({
5175 "select__dropdown-icon" : "react-inputs-validation__select__dropdown-icon___1T5r2" ,
5276 "select__dropdown-name" : "react-inputs-validation__select__dropdown-name___3hghL" ,
5377 "select__dropdown-icon-container" : "react-inputs-validation__select__dropdown-icon-container___2ild-"
54- } ) ;
55-
56- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
57-
58- function _interopRequireWildcard ( obj ) { if ( obj && obj . __esModule ) { return obj ; } else { var newObj = { } ; if ( obj != null ) { for ( var key in obj ) { if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) { var desc = Object . defineProperty && Object . getOwnPropertyDescriptor ? Object . getOwnPropertyDescriptor ( obj , key ) : { } ; if ( desc . get || desc . set ) { Object . defineProperty ( newObj , key , desc ) ; } else { newObj [ key ] = obj [ key ] ; } } } } newObj . default = obj ; return newObj ; } }
59-
60- function _typeof ( obj ) { if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
61-
62- function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
63-
64- function _defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } }
65-
66- function _createClass ( Constructor , protoProps , staticProps ) { if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) _defineProperties ( Constructor , staticProps ) ; return Constructor ; }
67-
68- function _possibleConstructorReturn ( self , call ) { if ( call && ( _typeof ( call ) === "object" || typeof call === "function" ) ) { return call ; } return _assertThisInitialized ( self ) ; }
69-
70- function _getPrototypeOf ( o ) { _getPrototypeOf = Object . setPrototypeOf ? Object . getPrototypeOf : function _getPrototypeOf ( o ) { return o . __proto__ || Object . getPrototypeOf ( o ) ; } ; return _getPrototypeOf ( o ) ; }
71-
72- function _inherits ( subClass , superClass ) { if ( typeof superClass !== "function" && superClass !== null ) { throw new TypeError ( "Super expression must either be null or a function" ) ; } subClass . prototype = Object . create ( superClass && superClass . prototype , { constructor : { value : subClass , writable : true , configurable : true } } ) ; if ( superClass ) _setPrototypeOf ( subClass , superClass ) ; }
73-
74- function _setPrototypeOf ( o , p ) { _setPrototypeOf = Object . setPrototypeOf || function _setPrototypeOf ( o , p ) { o . __proto__ = p ; return o ; } ; return _setPrototypeOf ( o , p ) ; }
75-
76- function _assertThisInitialized ( self ) { if ( self === void 0 ) { throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" ) ; } return self ; }
77-
78- function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
79-
78+ } ;
8079var TYPE = 'radiobox' ;
8180
8281var getDefaultValidationOption = function getDefaultValidationOption ( obj ) {
@@ -271,13 +270,13 @@ function (_React$Component) {
271270 err = _this$state . err ,
272271 msg = _this$state . msg ,
273272 successMsg = _this$state . successMsg ;
274- var wrapperClass = ( 0 , _classnames . default ) ( classNameWrapper , err && STYLES [ 'error' ] , successMsg && ! err && STYLES [ 'success' ] , STYLES [ 'radiobox__wrapper' ] , disabled && STYLES [ 'disabled' ] ) ;
275- var containerClass = ( 0 , _classnames . default ) ( classNameContainer , err && STYLES [ 'error' ] , successMsg && ! err && STYLES [ 'success' ] , STYLES [ 'radiobox__container' ] , disabled && STYLES [ 'disabled' ] ) ;
276- var inputClass = ( 0 , _classnames . default ) ( classNameInput , err && STYLES [ 'error' ] , successMsg && ! err && STYLES [ 'success' ] , STYLES [ 'radiobox__input' ] , disabled && STYLES [ 'disabled' ] ) ;
277- var labelClass = ( 0 , _classnames . default ) ( err && STYLES [ 'error' ] , successMsg && ! err && STYLES [ 'success' ] , STYLES [ 'radiobox__label' ] , disabled && STYLES [ 'disabled' ] ) ;
278- var optionListItemClass = ( 0 , _classnames . default ) ( classNameOptionListItem , err && STYLES [ 'error' ] , successMsg && ! err && STYLES [ 'success' ] , STYLES [ 'radiobox__item' ] , disabled && STYLES [ 'disabled' ] ) ;
279- var errMsgClass = ( 0 , _classnames . default ) ( STYLES [ 'msg' ] , err && STYLES [ 'error' ] ) ;
280- var successMsgClass = ( 0 , _classnames . default ) ( STYLES [ 'msg' ] , ! err && STYLES [ 'success' ] ) ;
273+ var wrapperClass = ( 0 , _classnames . default ) ( classNameWrapper , err && reactInputsValidationCss [ 'error' ] , successMsg && ! err && reactInputsValidationCss [ 'success' ] , reactInputsValidationCss [ 'radiobox__wrapper' ] , disabled && reactInputsValidationCss [ 'disabled' ] ) ;
274+ var containerClass = ( 0 , _classnames . default ) ( classNameContainer , err && reactInputsValidationCss [ 'error' ] , successMsg && ! err && reactInputsValidationCss [ 'success' ] , reactInputsValidationCss [ 'radiobox__container' ] , disabled && reactInputsValidationCss [ 'disabled' ] ) ;
275+ var inputClass = ( 0 , _classnames . default ) ( classNameInput , err && reactInputsValidationCss [ 'error' ] , successMsg && ! err && reactInputsValidationCss [ 'success' ] , reactInputsValidationCss [ 'radiobox__input' ] , disabled && reactInputsValidationCss [ 'disabled' ] ) ;
276+ var labelClass = ( 0 , _classnames . default ) ( err && reactInputsValidationCss [ 'error' ] , successMsg && ! err && reactInputsValidationCss [ 'success' ] , reactInputsValidationCss [ 'radiobox__label' ] , disabled && reactInputsValidationCss [ 'disabled' ] ) ;
277+ var optionListItemClass = ( 0 , _classnames . default ) ( classNameOptionListItem , err && reactInputsValidationCss [ 'error' ] , successMsg && ! err && reactInputsValidationCss [ 'success' ] , reactInputsValidationCss [ 'radiobox__item' ] , disabled && reactInputsValidationCss [ 'disabled' ] ) ;
278+ var errMsgClass = ( 0 , _classnames . default ) ( reactInputsValidationCss [ 'msg' ] , err && reactInputsValidationCss [ 'error' ] ) ;
279+ var successMsgClass = ( 0 , _classnames . default ) ( reactInputsValidationCss [ 'msg' ] , ! err && reactInputsValidationCss [ 'success' ] ) ;
281280 var msgHtml ;
282281
283282 var _getDefaultValidation3 = getDefaultValidationOption ( validationOption ) ,
@@ -311,14 +310,14 @@ function (_React$Component) {
311310 value : value ,
312311 checked : checked ,
313312 disabled : disabled ,
314- className : checked ? "" . concat ( STYLES [ 'checked' ] , " " ) . concat ( inputClass ) : "" . concat ( inputClass ) ,
313+ className : checked ? "" . concat ( reactInputsValidationCss [ 'checked' ] , " " ) . concat ( inputClass ) : "" . concat ( inputClass ) ,
315314 onChange : function onChange ( e ) {
316315 return _this2 . onChange ( i . id , e ) ;
317316 } ,
318317 style : customStyleInput
319318 } ) , React . createElement ( "label" , {
320319 htmlFor : "" . concat ( id , "-" ) . concat ( k ) ,
321- className : checked ? "" . concat ( STYLES [ 'checked' ] , " " ) . concat ( labelClass ) : "" . concat ( labelClass )
320+ className : checked ? "" . concat ( reactInputsValidationCss [ 'checked' ] , " " ) . concat ( labelClass ) : "" . concat ( labelClass )
322321 } , i . name ) ) ;
323322 } ) ;
324323 }
0 commit comments