groundfloor-react-ui 1.2.97 → 1.2.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1390,7 +1390,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1390
1390
  margin-top: -15.5px;
1391
1391
  cursor: pointer;
1392
1392
  line-height: normal !important;
1393
- `,Ut=({getValue:e,children:l,...o})=>{const i=e().length;return t.createElement(w.ValueContainer,z({"data-accordion":"contentClickFalse"},o),t.createElement("span",{"data-accordion":"contentClickFalse"}),l,i>1&&t.createElement("span",{className:"text-more-alt"},"& ",i-1," more"))},Yt=({label:e,labelStyle:l,optionArr:o,selectedValue:i,setSelectedValue:r,placeHolder:a,isClearable:n,isValid:c,height:s,fontSize:d,loadOptions:p,onInputChange:m,clearSelected:u,customWrapperStyles:g,customLabelStyles:f,isRequired:h,dropdownType:y,isDisabled:x,isLoading:C,id:v,iconName:A,iconStyles:S,iconColor:k,iconSize:E,showIndicator:V,leftIcon:M,leftIconColor:B,leftIconSize:L,backgroundColor:H,placeHolderColor:I,indicatorBackgroundColor:W,inputColor:P,menuListFooter:F,customSelectStyles:j,errorMessage:q,...Z})=>{const D=b()||R,O=e=>{const l={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},o=t.createElement("div",{style:{...l,backgroundColor:e?.data?.color??D.primary["primary-1"]}},t.createElement($,{icon:"check-icon",color:"white"})),i=t.createElement("div",{style:{...l,backgroundColor:"#e0e7ff"}});return t.createElement(w.Option,e,t.createElement("div",{"data-accordion":"contentClickFalse",style:{display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%"}},e.isSelected?o:i,t.createElement("div",{className:"text-main-alt","data-accordion":"contentClickFalse",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...l})=>{const o=l?.data?.label||"Select";return!e&&t.createElement("span",{className:"text-main-alt-value"},o)},X={control:(e,t)=>({...e,border:c?H&&c?"1px solid "+H:"1px solid "+D.border:"1px solid "+D.ui.error,minWidth:"singleSelect"===y||"asyncSingleSelect"===y?"120px":"185px",height:`${s}px`,minHeight:`${s}px`,boxShadow:(t.isSelected||t.isFocused)&&"none",backgroundColor:t.isDisabled?D.variant["neutral-5"]:H||D.additional.white}),placeholder:e=>({...e,fontSize:d+"px",marginLeft:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"auto",maxWidth:"89%",marginRight:"0px",color:I||"hsl(0, 0%, 50%)"}),dropdownIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"2px",backgroundColor:W||"transparent",borderBottomLeftRadius:"0",borderBottomRightRadius:"4.32px",borderTopLeftRadius:0,borderTopRightRadius:"4.32px",position:"relative",top:"-1px",right:"-1px"}),clearIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,fontSize:d+"px",marginTop:"-4px"}),indicatorsContainer:e=>({...e,padding:0}),menu:e=>({...e,border:"none",marginTop:"1px",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",outline:"none",boxShadow:"0px 6px 20px rgba(56, 66, 100, 0.15)",borderRadius:"4.32px",fontSize:d+"px",width:"100%",minWidth:"singleSelect"===y||"asyncSingleSelect"===y?"120px":"185px"}),singleValue:e=>({...e,fontSize:d+"px",marginLeft:"0px",width:"auto",marginRight:0,display:"grid"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto",display:"grid"}),input:e=>({...e,fontSize:d+"px",color:P||"hsl(0, 0%, 20%)",padding:0,margin:0}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?D.neutral["neutral-5"]:D.additional.white,padding:"10px",cursor:t.isDisabled?"not-allowed":"pointer",color:"#081348",opacity:t.isDisabled?.6:1,width:"inherit",boxSizing:"initial"}),menuPortal:e=>({...e,zIndex:99999999}),...j},J={DropdownIndicator:e=>{const l=t.createElement(w.DropdownIndicator,e,t.createElement(Jt,{"data-accordion":"contentClickFalse"},t.createElement($,{icon:A,color:k,size:E,customstyles:S,"data-accordion":"contentClickFalse"})));return!0===V?l:null},ValueContainer:Ut,IndicatorSeparator:()=>null,ClearIndicator:e=>t.createElement(w.ClearIndicator,e,n?t.createElement(Jt,{onClick:()=>{u(),e.clearValue()},"data-accordion":"contentClickFalse"},t.createElement($,{icon:"cross-icon",color:"black",size:8,"data-accordion":"contentClickFalse"})):null),MenuList:e=>{const{MenuListHeader:l=null,MenuListFooter:o=null}=e.selectProps.components;return t.createElement(w.MenuList,z({},e,{"data-accordion":"contentClickFalse"}),e.children.length&&l,e.children,e.children.length&&o)},MenuListFooter:F};let U=null;switch(y){case"multiSelect":U=t.createElement(Nt,z({type:"multiSelect",MultiValue:G,Option:O,value:i,CommonRenderedComponent:J,optionArr:o,placeHolder:a,isDisabled:x,stylesComp:X,setSelectedValue:r,isLoading:C,id:v,isClearable:n},Z));break;case"asyncSingleSelect":U=t.createElement(Qt,z({CommonRenderedComponent:J,loadOptions:p,onInputChange:m,styles:X,placeholder:a,onChange:r,isLoading:C,isDisabled:x,id:v,value:i,isClearable:n},Z));break;case"asyncMultiSelect":U=t.createElement(Qt,z({type:"asyncMultiSelect",CommonRenderedComponent:J,MultiValue:G,Option:O,onChange:r,placeholder:a,styles:X,isDisabled:x,isLoading:C,loadOptions:p,onInputChange:m,id:v,isClearable:n},Z));break;default:U=t.createElement(Nt,z({type:"singleSelect",value:{value:i?i.value:"",label:i?i.label:""},CommonRenderedComponent:J,optionArr:o,placeHolder:a,isDisabled:x,stylesComp:X,setSelectedValue:r,isLoading:C,id:v,isClearable:n},Z))}return t.createElement(Gt,{style:g,backgroundColor:H,isValid:c,fontSize:d,theme:D,isDisabled:x},e&&t.createElement(Xt,{inBuiltCss:T,labelWrapperStyle:"selectComp-label-wrapper",style:f},t.createElement(ot,{customStyles:l,type:"label-text",text:e,style:{marginBottom:"8px",paddingBottom:"0px"}}),h&&t.createElement("div",{style:{marginLeft:"4px",color:`${D.ui.error}`}},"*")),U,!c&&q)},Nt=({type:e,Option:l,value:o,CommonRenderedComponent:i,MultiValue:r,optionArr:a,placeHolder:n,isDisabled:c,stylesComp:s,setSelectedValue:d,isLoading:p,id:m,isClearable:b,...u})=>{let g={...i};return"multiSelect"===e&&(g.MultiValue=r,g.Option=l),t.createElement(A,z({className:"select-manage-page contentClickFalse",classNamePrefix:"new-select",name:"select-dropdown",components:g,options:a,placeholder:n,isDisabled:c,value:o,styles:s,onChange:d,isLoading:p,id:m,isClearable:b,isMulti:"multiSelect"===e,hideSelectedOptions:!1,closeMenuOnSelect:"multiSelect"!==e,menuShouldScrollIntoView:!1,"data-accordion":"contentClickFalse"},u))},Qt=({CommonRenderedComponent:e,MultiValue:l,Option:o,type:i,id:r,styles:a,...n})=>{let c={...e};return"asyncMultiSelect"===i&&(c.MultiValue=l,c.Option=o),t.createElement(S,z({className:"select-manage-page contentClickFalse ",classNamePrefix:"new-select",name:"select-dropdown",components:c,isMulti:"asyncMultiSelect"===i,defaultOptions:!0,hideSelectedOptions:!1,closeMenuOnSelect:"asyncMultiSelect"!==i,isSearchable:!0,styles:a,menuShouldScrollIntoView:!1,"data-accordion":"contentClickFalse"},n))};Yt.propTypes={label:e.string,labelStyle:e.object,optionArr:e.array,selectedValue:e.object,setSelectedValue:e.func,placeHolder:e.string,fontSize:e.number,clearSelected:e.func,loadOptions:e.func,onInputChange:e.func,customWrapperStyles:e.object,customLabelStyles:e.object,isRequired:e.bool,dropdownType:e.string,isDisabled:e.bool,isLoading:e.bool,isValid:e.bool,height:e.number,isClearable:e.bool,id:e.string,iconName:e.string,iconColor:e.string,iconSize:e.number,leftIcon:e.string,leftIconColor:e.string,leftIconSize:e.number,showIndicator:e.bool,backgroundColor:e.string,placeHolderColor:e.string,inputColor:e.string,menuListFooter:e.any,customSelectStyles:e.object},Yt.defaultProps={label:"",labelStyle:{},optionArr:[],selectedValue:{},setSelectedValue:void 0,placeHolder:"Select an option",isValid:!0,isClearable:!1,height:31,fontSize:14,loadOptions:()=>{},onInputChange:()=>{},clearSelected:()=>{},customWrapperStyles:{},customLabelStyles:{},isRequired:!1,dropdownType:"singleSelect",isDisabled:!1,isLoading:!1,id:"",iconName:"triangle-down",iconColor:"black",iconSize:8,leftIcon:"",leftIconColor:"black",leftIconSize:10,showIndicator:!0,customSelectStyles:{}};const Kt=m.div`
1393
+ `,Ut=({getValue:e,children:l,...o})=>{const i=e().length;return t.createElement(w.ValueContainer,z({"data-accordion":"contentClickFalse"},o),t.createElement("span",{"data-accordion":"contentClickFalse"}),l,i>1&&t.createElement("span",{className:"text-more-alt"},"& ",i-1," more"))},Yt=({label:e,labelStyle:l,optionArr:o,selectedValue:i,setSelectedValue:r,placeHolder:a,isClearable:n,isValid:c,height:s,fontSize:d,loadOptions:p,onInputChange:m,clearSelected:u,customWrapperStyles:g,customLabelStyles:f,isRequired:h,dropdownType:y,isDisabled:x,isLoading:C,id:v,iconName:A,iconStyles:S,iconColor:k,iconSize:E,showIndicator:V,leftIcon:M,leftIconColor:B,leftIconSize:L,backgroundColor:H,placeHolderColor:I,indicatorBackgroundColor:W,inputColor:P,menuListFooter:F,customSelectStyles:j,errorMessage:q,...Z})=>{const D=b()||R,O=e=>{const l={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px",boxSizing:"content-box"},o=t.createElement("div",{style:{...l,backgroundColor:e?.data?.color??D.primary["primary-1"]}},t.createElement($,{icon:"check-icon",color:"white"})),i=t.createElement("div",{style:{...l,backgroundColor:"#e0e7ff"}});return t.createElement(w.Option,e,t.createElement("div",{"data-accordion":"contentClickFalse",style:{display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%"}},e.isSelected?o:i,t.createElement("div",{className:"text-main-alt","data-accordion":"contentClickFalse",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...l})=>{const o=l?.data?.label||"Select";return!e&&t.createElement("span",{className:"text-main-alt-value"},o)},X={control:(e,t)=>({...e,border:c?H&&c?"1px solid "+H:"1px solid "+D.border:"1px solid "+D.ui.error,minWidth:"singleSelect"===y||"asyncSingleSelect"===y?"120px":"185px",height:`${s}px`,minHeight:`${s}px`,boxShadow:(t.isSelected||t.isFocused)&&"none",backgroundColor:t.isDisabled?D.variant["neutral-5"]:H||D.additional.white}),placeholder:e=>({...e,fontSize:d+"px",marginLeft:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"auto",maxWidth:"89%",marginRight:"0px",color:I||"hsl(0, 0%, 50%)"}),dropdownIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"2px",backgroundColor:W||"transparent",borderBottomLeftRadius:"0",borderBottomRightRadius:"4.32px",borderTopLeftRadius:0,borderTopRightRadius:"4.32px",position:"relative",top:"-1px",right:"-1px"}),clearIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,fontSize:d+"px",marginTop:"-4px"}),indicatorsContainer:e=>({...e,padding:0}),menu:e=>({...e,border:"none",marginTop:"1px",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",outline:"none",boxShadow:"0px 6px 20px rgba(56, 66, 100, 0.15)",borderRadius:"4.32px",fontSize:d+"px",width:"100%",minWidth:"singleSelect"===y||"asyncSingleSelect"===y?"120px":"185px"}),singleValue:e=>({...e,fontSize:d+"px",marginLeft:"0px",width:"auto",marginRight:0,display:"grid"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto",display:"grid"}),input:e=>({...e,fontSize:d+"px",color:P||"hsl(0, 0%, 20%)",padding:0,margin:0}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?D.neutral["neutral-5"]:D.additional.white,padding:"10px",cursor:t.isDisabled?"not-allowed":"pointer",color:"#081348",opacity:t.isDisabled?.6:1,width:"inherit",boxSizing:"initial"}),menuPortal:e=>({...e,zIndex:99999999}),...j},J={DropdownIndicator:e=>{const l=t.createElement(w.DropdownIndicator,e,t.createElement(Jt,{"data-accordion":"contentClickFalse"},t.createElement($,{icon:A,color:k,size:E,customstyles:S,"data-accordion":"contentClickFalse"})));return!0===V?l:null},ValueContainer:Ut,IndicatorSeparator:()=>null,ClearIndicator:e=>t.createElement(w.ClearIndicator,e,n?t.createElement(Jt,{onClick:()=>{u(),e.clearValue()},"data-accordion":"contentClickFalse"},t.createElement($,{icon:"cross-icon",color:"black",size:8,"data-accordion":"contentClickFalse"})):null),MenuList:e=>{const{MenuListHeader:l=null,MenuListFooter:o=null}=e.selectProps.components;return t.createElement(w.MenuList,z({},e,{"data-accordion":"contentClickFalse"}),e.children.length&&l,e.children,e.children.length&&o)},MenuListFooter:F};let U=null;switch(y){case"multiSelect":U=t.createElement(Nt,z({type:"multiSelect",MultiValue:G,Option:O,value:i,CommonRenderedComponent:J,optionArr:o,placeHolder:a,isDisabled:x,stylesComp:X,setSelectedValue:r,isLoading:C,id:v,isClearable:n},Z));break;case"asyncSingleSelect":U=t.createElement(Qt,z({CommonRenderedComponent:J,loadOptions:p,onInputChange:m,styles:X,placeholder:a,onChange:r,isLoading:C,isDisabled:x,id:v,value:i,isClearable:n},Z));break;case"asyncMultiSelect":U=t.createElement(Qt,z({type:"asyncMultiSelect",CommonRenderedComponent:J,MultiValue:G,Option:O,onChange:r,placeholder:a,styles:X,isDisabled:x,isLoading:C,loadOptions:p,onInputChange:m,id:v,isClearable:n},Z));break;default:U=t.createElement(Nt,z({type:"singleSelect",value:{value:i?i.value:"",label:i?i.label:""},CommonRenderedComponent:J,optionArr:o,placeHolder:a,isDisabled:x,stylesComp:X,setSelectedValue:r,isLoading:C,id:v,isClearable:n},Z))}return t.createElement(Gt,{style:g,backgroundColor:H,isValid:c,fontSize:d,theme:D,isDisabled:x},e&&t.createElement(Xt,{inBuiltCss:T,labelWrapperStyle:"selectComp-label-wrapper",style:f},t.createElement(ot,{customStyles:l,type:"label-text",text:e,style:{marginBottom:"8px",paddingBottom:"0px"}}),h&&t.createElement("div",{style:{marginLeft:"4px",color:`${D.ui.error}`}},"*")),U,!c&&q)},Nt=({type:e,Option:l,value:o,CommonRenderedComponent:i,MultiValue:r,optionArr:a,placeHolder:n,isDisabled:c,stylesComp:s,setSelectedValue:d,isLoading:p,id:m,isClearable:b,...u})=>{let g={...i};return"multiSelect"===e&&(g.MultiValue=r,g.Option=l),t.createElement(A,z({className:"select-manage-page contentClickFalse",classNamePrefix:"new-select",name:"select-dropdown",components:g,options:a,placeholder:n,isDisabled:c,value:o,styles:s,onChange:d,isLoading:p,id:m,isClearable:b,isMulti:"multiSelect"===e,hideSelectedOptions:!1,closeMenuOnSelect:"multiSelect"!==e,menuShouldScrollIntoView:!1,"data-accordion":"contentClickFalse"},u))},Qt=({CommonRenderedComponent:e,MultiValue:l,Option:o,type:i,id:r,styles:a,...n})=>{let c={...e};return"asyncMultiSelect"===i&&(c.MultiValue=l,c.Option=o),t.createElement(S,z({className:"select-manage-page contentClickFalse ",classNamePrefix:"new-select",name:"select-dropdown",components:c,isMulti:"asyncMultiSelect"===i,defaultOptions:!0,hideSelectedOptions:!1,closeMenuOnSelect:"asyncMultiSelect"!==i,isSearchable:!0,styles:a,menuShouldScrollIntoView:!1,"data-accordion":"contentClickFalse"},n))};Yt.propTypes={label:e.string,labelStyle:e.object,optionArr:e.array,selectedValue:e.object,setSelectedValue:e.func,placeHolder:e.string,fontSize:e.number,clearSelected:e.func,loadOptions:e.func,onInputChange:e.func,customWrapperStyles:e.object,customLabelStyles:e.object,isRequired:e.bool,dropdownType:e.string,isDisabled:e.bool,isLoading:e.bool,isValid:e.bool,height:e.number,isClearable:e.bool,id:e.string,iconName:e.string,iconColor:e.string,iconSize:e.number,leftIcon:e.string,leftIconColor:e.string,leftIconSize:e.number,showIndicator:e.bool,backgroundColor:e.string,placeHolderColor:e.string,inputColor:e.string,menuListFooter:e.any,customSelectStyles:e.object},Yt.defaultProps={label:"",labelStyle:{},optionArr:[],selectedValue:{},setSelectedValue:void 0,placeHolder:"Select an option",isValid:!0,isClearable:!1,height:31,fontSize:14,loadOptions:()=>{},onInputChange:()=>{},clearSelected:()=>{},customWrapperStyles:{},customLabelStyles:{},isRequired:!1,dropdownType:"singleSelect",isDisabled:!1,isLoading:!1,id:"",iconName:"triangle-down",iconColor:"black",iconSize:8,leftIcon:"",leftIconColor:"black",leftIconSize:10,showIndicator:!0,customSelectStyles:{}};const Kt=m.div`
1394
1394
  //Set the styles from the default styles object
1395
1395
  ${({inBuiltCss:e,defaultStyles:t})=>F(e,t)}
1396
1396
 
@@ -1937,7 +1937,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1937
1937
  margin-top: 3px;
1938
1938
  background-color: ${({theme:e})=>e.additional.white};
1939
1939
  transition: 0.2s;
1940
- margin-left: ${({checked:e,labelPosition:t})=>e?"4px":"inside"===t?"calc(100% - 18px)":"calc(100% - 20px)"};
1940
+ margin-left: ${({checked:e,labelPosition:t})=>e?"inside"===t?"calc(100% - 18px)":"calc(100% - 20px)":"4px"};
1941
1941
 
1942
1942
  // custom styles
1943
1943
  ${({customSwitchStyle:e})=>e}
@@ -1958,7 +1958,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1958
1958
  color: ${({theme:e,labelPosition:t})=>"inside"===t?e.neutral["neutral-5"]:e.additional["text-color"]};
1959
1959
  font-size: ${({labelPosition:e})=>"inside"===e?"10px":"16px"};
1960
1960
  position: ${({labelPosition:e})=>"inside"===e?"absolute":"initial"};
1961
- left: ${({checked:e})=>e?"36px":"22px"};
1961
+ left: ${({checked:e})=>e?"22px":"36px"};
1962
1962
  margin-right:${({labelPosition:e})=>"inside"===e?0:"8px"};
1963
1963
  // custom styles
1964
1964
  ${({optionStyle:e})=>e};
package/dist/index.js CHANGED
@@ -1390,7 +1390,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1390
1390
  margin-top: -15.5px;
1391
1391
  cursor: pointer;
1392
1392
  line-height: normal !important;
1393
- `,Ot=({getValue:e,children:t,...l})=>{const a=e().length;return g.default.createElement(c.components.ValueContainer,E({"data-accordion":"contentClickFalse"},l),g.default.createElement("span",{"data-accordion":"contentClickFalse"}),t,a>1&&g.default.createElement("span",{className:"text-more-alt"},"& ",a-1," more"))},Gt=({label:e,labelStyle:t,optionArr:a,selectedValue:o,setSelectedValue:r,placeHolder:i,isClearable:n,isValid:d,height:s,fontSize:u,loadOptions:p,onInputChange:f,clearSelected:m,customWrapperStyles:b,customLabelStyles:h,isRequired:y,dropdownType:x,isDisabled:C,isLoading:v,id:A,iconName:w,iconStyles:S,iconColor:k,iconSize:V,showIndicator:M,leftIcon:z,leftIconColor:B,leftIconSize:L,backgroundColor:I,placeHolderColor:W,indicatorBackgroundColor:P,inputColor:T,menuListFooter:F,customSelectStyles:j,errorMessage:q,...Z})=>{const D=l.useTheme()||H,O=e=>{const t={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},l=g.default.createElement("div",{style:{...t,backgroundColor:e?.data?.color??D.primary["primary-1"]}},g.default.createElement(N,{icon:"check-icon",color:"white"})),a=g.default.createElement("div",{style:{...t,backgroundColor:"#e0e7ff"}});return g.default.createElement(c.components.Option,e,g.default.createElement("div",{"data-accordion":"contentClickFalse",style:{display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%"}},e.isSelected?l:a,g.default.createElement("div",{className:"text-main-alt","data-accordion":"contentClickFalse",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...t})=>{const l=t?.data?.label||"Select";return!e&&g.default.createElement("span",{className:"text-main-alt-value"},l)},X={control:(e,t)=>({...e,border:d?I&&d?"1px solid "+I:"1px solid "+D.border:"1px solid "+D.ui.error,minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px",height:`${s}px`,minHeight:`${s}px`,boxShadow:(t.isSelected||t.isFocused)&&"none",backgroundColor:t.isDisabled?D.variant["neutral-5"]:I||D.additional.white}),placeholder:e=>({...e,fontSize:u+"px",marginLeft:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"auto",maxWidth:"89%",marginRight:"0px",color:W||"hsl(0, 0%, 50%)"}),dropdownIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"2px",backgroundColor:P||"transparent",borderBottomLeftRadius:"0",borderBottomRightRadius:"4.32px",borderTopLeftRadius:0,borderTopRightRadius:"4.32px",position:"relative",top:"-1px",right:"-1px"}),clearIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,fontSize:u+"px",marginTop:"-4px"}),indicatorsContainer:e=>({...e,padding:0}),menu:e=>({...e,border:"none",marginTop:"1px",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",outline:"none",boxShadow:"0px 6px 20px rgba(56, 66, 100, 0.15)",borderRadius:"4.32px",fontSize:u+"px",width:"100%",minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px"}),singleValue:e=>({...e,fontSize:u+"px",marginLeft:"0px",width:"auto",marginRight:0,display:"grid"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto",display:"grid"}),input:e=>({...e,fontSize:u+"px",color:T||"hsl(0, 0%, 20%)",padding:0,margin:0}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?D.neutral["neutral-5"]:D.additional.white,padding:"10px",cursor:t.isDisabled?"not-allowed":"pointer",color:"#081348",opacity:t.isDisabled?.6:1,width:"inherit",boxSizing:"initial"}),menuPortal:e=>({...e,zIndex:99999999}),...j},J={DropdownIndicator:e=>{const t=g.default.createElement(c.components.DropdownIndicator,e,g.default.createElement(Dt,{"data-accordion":"contentClickFalse"},g.default.createElement(N,{icon:w,color:k,size:V,customstyles:S,"data-accordion":"contentClickFalse"})));return!0===M?t:null},ValueContainer:Ot,IndicatorSeparator:()=>null,ClearIndicator:e=>g.default.createElement(c.components.ClearIndicator,e,n?g.default.createElement(Dt,{onClick:()=>{m(),e.clearValue()},"data-accordion":"contentClickFalse"},g.default.createElement(N,{icon:"cross-icon",color:"black",size:8,"data-accordion":"contentClickFalse"})):null),MenuList:e=>{const{MenuListHeader:t=null,MenuListFooter:l=null}=e.selectProps.components;return g.default.createElement(c.components.MenuList,E({},e,{"data-accordion":"contentClickFalse"}),e.children.length&&t,e.children,e.children.length&&l)},MenuListFooter:F};let U=null;switch(x){case"multiSelect":U=g.default.createElement(Xt,E({type:"multiSelect",MultiValue:G,Option:O,value:o,CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:C,stylesComp:X,setSelectedValue:r,isLoading:v,id:A,isClearable:n},Z));break;case"asyncSingleSelect":U=g.default.createElement(Jt,E({CommonRenderedComponent:J,loadOptions:p,onInputChange:f,styles:X,placeholder:i,onChange:r,isLoading:v,isDisabled:C,id:A,value:o,isClearable:n},Z));break;case"asyncMultiSelect":U=g.default.createElement(Jt,E({type:"asyncMultiSelect",CommonRenderedComponent:J,MultiValue:G,Option:O,onChange:r,placeholder:i,styles:X,isDisabled:C,isLoading:v,loadOptions:p,onInputChange:f,id:A,isClearable:n},Z));break;default:U=g.default.createElement(Xt,E({type:"singleSelect",value:{value:o?o.value:"",label:o?o.label:""},CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:C,stylesComp:X,setSelectedValue:r,isLoading:v,id:A,isClearable:n},Z))}return g.default.createElement(qt,{style:b,backgroundColor:I,isValid:d,fontSize:u,theme:D,isDisabled:C},e&&g.default.createElement(Zt,{inBuiltCss:R,labelWrapperStyle:"selectComp-label-wrapper",style:h},g.default.createElement(_e,{customStyles:t,type:"label-text",text:e,style:{marginBottom:"8px",paddingBottom:"0px"}}),y&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${D.ui.error}`}},"*")),U,!d&&q)},Xt=({type:e,Option:t,value:l,CommonRenderedComponent:a,MultiValue:o,optionArr:r,placeHolder:i,isDisabled:n,stylesComp:c,setSelectedValue:d,isLoading:s,id:u,isClearable:p,...f})=>{let m={...a};return"multiSelect"===e&&(m.MultiValue=o,m.Option=t),g.default.createElement(v.default,E({className:"select-manage-page contentClickFalse",classNamePrefix:"new-select",name:"select-dropdown",components:m,options:r,placeholder:i,isDisabled:n,value:l,styles:c,onChange:d,isLoading:s,id:u,isClearable:p,isMulti:"multiSelect"===e,hideSelectedOptions:!1,closeMenuOnSelect:"multiSelect"!==e,menuShouldScrollIntoView:!1,"data-accordion":"contentClickFalse"},f))},Jt=({CommonRenderedComponent:e,MultiValue:t,Option:l,type:a,id:o,styles:r,...i})=>{let n={...e};return"asyncMultiSelect"===a&&(n.MultiValue=t,n.Option=l),g.default.createElement(A.default,E({className:"select-manage-page contentClickFalse ",classNamePrefix:"new-select",name:"select-dropdown",components:n,isMulti:"asyncMultiSelect"===a,defaultOptions:!0,hideSelectedOptions:!1,closeMenuOnSelect:"asyncMultiSelect"!==a,isSearchable:!0,styles:r,menuShouldScrollIntoView:!1,"data-accordion":"contentClickFalse"},i))};Gt.propTypes={label:b.default.string,labelStyle:b.default.object,optionArr:b.default.array,selectedValue:b.default.object,setSelectedValue:b.default.func,placeHolder:b.default.string,fontSize:b.default.number,clearSelected:b.default.func,loadOptions:b.default.func,onInputChange:b.default.func,customWrapperStyles:b.default.object,customLabelStyles:b.default.object,isRequired:b.default.bool,dropdownType:b.default.string,isDisabled:b.default.bool,isLoading:b.default.bool,isValid:b.default.bool,height:b.default.number,isClearable:b.default.bool,id:b.default.string,iconName:b.default.string,iconColor:b.default.string,iconSize:b.default.number,leftIcon:b.default.string,leftIconColor:b.default.string,leftIconSize:b.default.number,showIndicator:b.default.bool,backgroundColor:b.default.string,placeHolderColor:b.default.string,inputColor:b.default.string,menuListFooter:b.default.any,customSelectStyles:b.default.object},Gt.defaultProps={label:"",labelStyle:{},optionArr:[],selectedValue:{},setSelectedValue:void 0,placeHolder:"Select an option",isValid:!0,isClearable:!1,height:31,fontSize:14,loadOptions:()=>{},onInputChange:()=>{},clearSelected:()=>{},customWrapperStyles:{},customLabelStyles:{},isRequired:!1,dropdownType:"singleSelect",isDisabled:!1,isLoading:!1,id:"",iconName:"triangle-down",iconColor:"black",iconSize:8,leftIcon:"",leftIconColor:"black",leftIconSize:10,showIndicator:!0,customSelectStyles:{}};const Ut=h.default.div`
1393
+ `,Ot=({getValue:e,children:t,...l})=>{const a=e().length;return g.default.createElement(c.components.ValueContainer,E({"data-accordion":"contentClickFalse"},l),g.default.createElement("span",{"data-accordion":"contentClickFalse"}),t,a>1&&g.default.createElement("span",{className:"text-more-alt"},"& ",a-1," more"))},Gt=({label:e,labelStyle:t,optionArr:a,selectedValue:o,setSelectedValue:r,placeHolder:i,isClearable:n,isValid:d,height:s,fontSize:u,loadOptions:p,onInputChange:f,clearSelected:m,customWrapperStyles:b,customLabelStyles:h,isRequired:y,dropdownType:x,isDisabled:C,isLoading:v,id:A,iconName:w,iconStyles:S,iconColor:k,iconSize:V,showIndicator:M,leftIcon:z,leftIconColor:B,leftIconSize:L,backgroundColor:I,placeHolderColor:W,indicatorBackgroundColor:P,inputColor:T,menuListFooter:F,customSelectStyles:j,errorMessage:q,...Z})=>{const D=l.useTheme()||H,O=e=>{const t={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px",boxSizing:"content-box"},l=g.default.createElement("div",{style:{...t,backgroundColor:e?.data?.color??D.primary["primary-1"]}},g.default.createElement(N,{icon:"check-icon",color:"white"})),a=g.default.createElement("div",{style:{...t,backgroundColor:"#e0e7ff"}});return g.default.createElement(c.components.Option,e,g.default.createElement("div",{"data-accordion":"contentClickFalse",style:{display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%"}},e.isSelected?l:a,g.default.createElement("div",{className:"text-main-alt","data-accordion":"contentClickFalse",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...t})=>{const l=t?.data?.label||"Select";return!e&&g.default.createElement("span",{className:"text-main-alt-value"},l)},X={control:(e,t)=>({...e,border:d?I&&d?"1px solid "+I:"1px solid "+D.border:"1px solid "+D.ui.error,minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px",height:`${s}px`,minHeight:`${s}px`,boxShadow:(t.isSelected||t.isFocused)&&"none",backgroundColor:t.isDisabled?D.variant["neutral-5"]:I||D.additional.white}),placeholder:e=>({...e,fontSize:u+"px",marginLeft:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"auto",maxWidth:"89%",marginRight:"0px",color:W||"hsl(0, 0%, 50%)"}),dropdownIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"2px",backgroundColor:P||"transparent",borderBottomLeftRadius:"0",borderBottomRightRadius:"4.32px",borderTopLeftRadius:0,borderTopRightRadius:"4.32px",position:"relative",top:"-1px",right:"-1px"}),clearIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,fontSize:u+"px",marginTop:"-4px"}),indicatorsContainer:e=>({...e,padding:0}),menu:e=>({...e,border:"none",marginTop:"1px",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",outline:"none",boxShadow:"0px 6px 20px rgba(56, 66, 100, 0.15)",borderRadius:"4.32px",fontSize:u+"px",width:"100%",minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px"}),singleValue:e=>({...e,fontSize:u+"px",marginLeft:"0px",width:"auto",marginRight:0,display:"grid"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto",display:"grid"}),input:e=>({...e,fontSize:u+"px",color:T||"hsl(0, 0%, 20%)",padding:0,margin:0}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?D.neutral["neutral-5"]:D.additional.white,padding:"10px",cursor:t.isDisabled?"not-allowed":"pointer",color:"#081348",opacity:t.isDisabled?.6:1,width:"inherit",boxSizing:"initial"}),menuPortal:e=>({...e,zIndex:99999999}),...j},J={DropdownIndicator:e=>{const t=g.default.createElement(c.components.DropdownIndicator,e,g.default.createElement(Dt,{"data-accordion":"contentClickFalse"},g.default.createElement(N,{icon:w,color:k,size:V,customstyles:S,"data-accordion":"contentClickFalse"})));return!0===M?t:null},ValueContainer:Ot,IndicatorSeparator:()=>null,ClearIndicator:e=>g.default.createElement(c.components.ClearIndicator,e,n?g.default.createElement(Dt,{onClick:()=>{m(),e.clearValue()},"data-accordion":"contentClickFalse"},g.default.createElement(N,{icon:"cross-icon",color:"black",size:8,"data-accordion":"contentClickFalse"})):null),MenuList:e=>{const{MenuListHeader:t=null,MenuListFooter:l=null}=e.selectProps.components;return g.default.createElement(c.components.MenuList,E({},e,{"data-accordion":"contentClickFalse"}),e.children.length&&t,e.children,e.children.length&&l)},MenuListFooter:F};let U=null;switch(x){case"multiSelect":U=g.default.createElement(Xt,E({type:"multiSelect",MultiValue:G,Option:O,value:o,CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:C,stylesComp:X,setSelectedValue:r,isLoading:v,id:A,isClearable:n},Z));break;case"asyncSingleSelect":U=g.default.createElement(Jt,E({CommonRenderedComponent:J,loadOptions:p,onInputChange:f,styles:X,placeholder:i,onChange:r,isLoading:v,isDisabled:C,id:A,value:o,isClearable:n},Z));break;case"asyncMultiSelect":U=g.default.createElement(Jt,E({type:"asyncMultiSelect",CommonRenderedComponent:J,MultiValue:G,Option:O,onChange:r,placeholder:i,styles:X,isDisabled:C,isLoading:v,loadOptions:p,onInputChange:f,id:A,isClearable:n},Z));break;default:U=g.default.createElement(Xt,E({type:"singleSelect",value:{value:o?o.value:"",label:o?o.label:""},CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:C,stylesComp:X,setSelectedValue:r,isLoading:v,id:A,isClearable:n},Z))}return g.default.createElement(qt,{style:b,backgroundColor:I,isValid:d,fontSize:u,theme:D,isDisabled:C},e&&g.default.createElement(Zt,{inBuiltCss:R,labelWrapperStyle:"selectComp-label-wrapper",style:h},g.default.createElement(_e,{customStyles:t,type:"label-text",text:e,style:{marginBottom:"8px",paddingBottom:"0px"}}),y&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${D.ui.error}`}},"*")),U,!d&&q)},Xt=({type:e,Option:t,value:l,CommonRenderedComponent:a,MultiValue:o,optionArr:r,placeHolder:i,isDisabled:n,stylesComp:c,setSelectedValue:d,isLoading:s,id:u,isClearable:p,...f})=>{let m={...a};return"multiSelect"===e&&(m.MultiValue=o,m.Option=t),g.default.createElement(v.default,E({className:"select-manage-page contentClickFalse",classNamePrefix:"new-select",name:"select-dropdown",components:m,options:r,placeholder:i,isDisabled:n,value:l,styles:c,onChange:d,isLoading:s,id:u,isClearable:p,isMulti:"multiSelect"===e,hideSelectedOptions:!1,closeMenuOnSelect:"multiSelect"!==e,menuShouldScrollIntoView:!1,"data-accordion":"contentClickFalse"},f))},Jt=({CommonRenderedComponent:e,MultiValue:t,Option:l,type:a,id:o,styles:r,...i})=>{let n={...e};return"asyncMultiSelect"===a&&(n.MultiValue=t,n.Option=l),g.default.createElement(A.default,E({className:"select-manage-page contentClickFalse ",classNamePrefix:"new-select",name:"select-dropdown",components:n,isMulti:"asyncMultiSelect"===a,defaultOptions:!0,hideSelectedOptions:!1,closeMenuOnSelect:"asyncMultiSelect"!==a,isSearchable:!0,styles:r,menuShouldScrollIntoView:!1,"data-accordion":"contentClickFalse"},i))};Gt.propTypes={label:b.default.string,labelStyle:b.default.object,optionArr:b.default.array,selectedValue:b.default.object,setSelectedValue:b.default.func,placeHolder:b.default.string,fontSize:b.default.number,clearSelected:b.default.func,loadOptions:b.default.func,onInputChange:b.default.func,customWrapperStyles:b.default.object,customLabelStyles:b.default.object,isRequired:b.default.bool,dropdownType:b.default.string,isDisabled:b.default.bool,isLoading:b.default.bool,isValid:b.default.bool,height:b.default.number,isClearable:b.default.bool,id:b.default.string,iconName:b.default.string,iconColor:b.default.string,iconSize:b.default.number,leftIcon:b.default.string,leftIconColor:b.default.string,leftIconSize:b.default.number,showIndicator:b.default.bool,backgroundColor:b.default.string,placeHolderColor:b.default.string,inputColor:b.default.string,menuListFooter:b.default.any,customSelectStyles:b.default.object},Gt.defaultProps={label:"",labelStyle:{},optionArr:[],selectedValue:{},setSelectedValue:void 0,placeHolder:"Select an option",isValid:!0,isClearable:!1,height:31,fontSize:14,loadOptions:()=>{},onInputChange:()=>{},clearSelected:()=>{},customWrapperStyles:{},customLabelStyles:{},isRequired:!1,dropdownType:"singleSelect",isDisabled:!1,isLoading:!1,id:"",iconName:"triangle-down",iconColor:"black",iconSize:8,leftIcon:"",leftIconColor:"black",leftIconSize:10,showIndicator:!0,customSelectStyles:{}};const Ut=h.default.div`
1394
1394
  //Set the styles from the default styles object
1395
1395
  ${({inBuiltCss:e,defaultStyles:t})=>W(e,t)}
1396
1396
 
@@ -1937,7 +1937,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1937
1937
  margin-top: 3px;
1938
1938
  background-color: ${({theme:e})=>e.additional.white};
1939
1939
  transition: 0.2s;
1940
- margin-left: ${({checked:e,labelPosition:t})=>e?"4px":"inside"===t?"calc(100% - 18px)":"calc(100% - 20px)"};
1940
+ margin-left: ${({checked:e,labelPosition:t})=>e?"inside"===t?"calc(100% - 18px)":"calc(100% - 20px)":"4px"};
1941
1941
 
1942
1942
  // custom styles
1943
1943
  ${({customSwitchStyle:e})=>e}
@@ -1958,7 +1958,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
1958
1958
  color: ${({theme:e,labelPosition:t})=>"inside"===t?e.neutral["neutral-5"]:e.additional["text-color"]};
1959
1959
  font-size: ${({labelPosition:e})=>"inside"===e?"10px":"16px"};
1960
1960
  position: ${({labelPosition:e})=>"inside"===e?"absolute":"initial"};
1961
- left: ${({checked:e})=>e?"36px":"22px"};
1961
+ left: ${({checked:e})=>e?"22px":"36px"};
1962
1962
  margin-right:${({labelPosition:e})=>"inside"===e?0:"8px"};
1963
1963
  // custom styles
1964
1964
  ${({optionStyle:e})=>e};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "groundfloor-react-ui",
3
3
  "description": "Official component library for Ground Floor",
4
- "version": "1.2.97",
4
+ "version": "1.2.98",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
7
7
  "private": false,