@@ -435,7 +435,7 @@ function insertRule(selector, content) {
435435 }
436436}
437437
438- var _excluded = [ "children" , "addons" , "label" , "helper" , "labelCol" , "wrapperCol" , "validationState" , "className" , "as" , "feedback" , "extra" , "noStyle" , "errorLevel" ] ;
438+ var _excluded = [ "children" , "addons" , "label" , "helper" , "labelCol" , "wrapperCol" , "validationState" , "className" , "as" , "feedback" , "floatingLabel" , " extra", "noStyle" , "errorLevel" ] ;
439439var isValidElementType = reactIs__default [ "default" ] . isValidElementType ;
440440
441441var _createContext = /*#__PURE__*/ React . createContext ( { } ) ,
@@ -609,7 +609,8 @@ var _FormGroup = /*#__PURE__*/function (_Component) {
609609 props . className ;
610610 var as = props . as ;
611611 props . feedback ;
612- var extraNode = props . extra ,
612+ var floatingLabel = props . floatingLabel ,
613+ extraNode = props . extra ,
613614 noStyle = props . noStyle ,
614615 _props$errorLevel = props . errorLevel ,
615616 errorLevel = _props$errorLevel === void 0 ? errorLevelGlobal : _props$errorLevel ,
@@ -639,19 +640,19 @@ var _FormGroup = /*#__PURE__*/function (_Component) {
639640
640641 if ( addons ) {
641642 if ( addons . pre ) {
642- addons . pre = /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . InputGroup . Prepend , null , /*#__PURE__*/ React . isValidElement ( addons . pre ) ? addons . pre : /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . InputGroup . Text , null , addons . pre ) ) ;
643+ addons . pre = /*#__PURE__*/ React . isValidElement ( addons . pre ) ? addons . pre : /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . InputGroup . Text , null , addons . pre ) ;
643644 }
644645
645646 if ( addons . end ) {
646- addons . end = /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . InputGroup . Append , null , /*#__PURE__*/ React . isValidElement ( addons . end ) ? addons . end : /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . InputGroup . Text , null , addons . end ) ) ;
647+ addons . end = /*#__PURE__*/ React . isValidElement ( addons . end ) ? addons . end : /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . InputGroup . Text , null , addons . end ) ;
647648 }
648649 } else {
649650 addons = { } ;
650651 }
651652
652653 if ( helper && ! /*#__PURE__*/ React . isValidElement ( helper ) ) {
653654 helper = /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . FormText , {
654- className : "text-muted"
655+ muted : true
655656 } , helper ) ;
656657 }
657658
@@ -669,11 +670,12 @@ var _FormGroup = /*#__PURE__*/function (_Component) {
669670 _this2 . forceUpdate ( ) ;
670671 }
671672 } ) ;
673+ var fieldInstance = typeof childList === 'function' ? childList ( ) : childList ;
672674 return /*#__PURE__*/ React__default [ "default" ] . createElement ( Provider , {
673675 value : this . registerField
674676 } , /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . FormGroup , Object . assign ( { } , fieldProps , groupProps , {
675677 as : groupAsProps
676- } ) , label , /*#__PURE__*/ React__default [ "default" ] . createElement ( Wrapper , wrapperCol , /*#__PURE__*/ React__default [ "default" ] . createElement ( AddonWrapper , addonWrapperProps , addons . pre , typeof childList === 'function' ? childList ( ) : childList , addons . end ) , error || helper ) , extraNode ) ) ;
678+ } ) , label , /*#__PURE__*/ React__default [ "default" ] . createElement ( Wrapper , wrapperCol , /*#__PURE__*/ React__default [ "default" ] . createElement ( AddonWrapper , addonWrapperProps , addons . pre , fieldInstance , addons . end ) , error || helper ) , extraNode ) ) ;
677679 } // If $memo is true, pass the children to Field for SCU diffing.
678680
679681
@@ -689,10 +691,8 @@ var _FormGroup = /*#__PURE__*/function (_Component) {
689691 var children = typeof childList === 'function' ? childList : React . Children . only ( childList ) ;
690692 var component = getChildComponent ( children ) ;
691693
692- if ( component === reactBootstrap . FormControl ) {
693- if ( children . props . as === 'select' && children . props . multiple ) {
694- component = 'multipleSelect' ;
695- }
694+ if ( ( component === reactBootstrap . FormControl && children . props . as === 'select' || component === reactBootstrap . FormSelect ) && children . props . multiple ) {
695+ component = 'multipleSelect' ;
696696 }
697697
698698 switch ( component ) {
@@ -830,7 +830,9 @@ var _FormGroup = /*#__PURE__*/function (_Component) {
830830
831831 return /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . FormGroup , Object . assign ( { } , restProps , groupProps , {
832832 as : groupAsProps
833- } ) , label , /*#__PURE__*/ React__default [ "default" ] . createElement ( Wrapper , wrapperCol , /*#__PURE__*/ React__default [ "default" ] . createElement ( AddonWrapper , addonWrapperProps , addons . pre , fieldInstance , addons . end ) , error || helper ) , extraNode ) ;
833+ } ) , ! floatingLabel && label , /*#__PURE__*/ React__default [ "default" ] . createElement ( Wrapper , wrapperCol , /*#__PURE__*/ React__default [ "default" ] . createElement ( AddonWrapper , addonWrapperProps , addons . pre , floatingLabel && label ? /*#__PURE__*/ React__default [ "default" ] . createElement ( reactBootstrap . FloatingLabel , {
834+ label : label . props . children
835+ } , fieldInstance ) : fieldInstance , addons . end ) , error || helper ) , extraNode ) ;
834836 } ) ;
835837 }
836838 } ) ) ;
@@ -859,6 +861,7 @@ _FormGroup.propTypes = {
859861 label : PropTypes__default [ "default" ] . any ,
860862 helper : PropTypes__default [ "default" ] . any ,
861863 labelCol : PropTypes__default [ "default" ] . object ,
864+ floatingLabel : PropTypes__default [ "default" ] . bool ,
862865 wrapperCol : PropTypes__default [ "default" ] . object ,
863866 addons : PropTypes__default [ "default" ] . object ,
864867 extra : PropTypes__default [ "default" ] . node ,
0 commit comments