groundfloor-react-ui 1.2.0 → 1.2.1

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.js CHANGED
@@ -1347,7 +1347,7 @@ ${({customInputColorStyle:e})=>e}
1347
1347
  margin-left: 6px;
1348
1348
  margin-top: -14px;
1349
1349
  cursor: pointer;
1350
- `,Pt=({label:e,labelStyle:t,optionArr:o,selectedValue:r,setSelectedValue:i,placeHolder:n,isClearable:c,isValid:s,height:d,fontSize:u,loadOptions:p,onInputChange:m,clearSelected:g,customWrapperStyles:y,customLabelStyles:x,isRequired:A,dropdownType:C,isDisabled:S,isLoading:w,id:E,...k})=>{const V=l.useTheme()||z,M=e=>f.default.createElement(a.components.DropdownIndicator,e,f.default.createElement(Wt,null,f.default.createElement(F,{icon:"triangle-down",color:"black",size:8}))),R=e=>f.default.createElement(a.components.ClearIndicator,e,c?f.default.createElement(Wt,{onClick:()=>{g(),e.clearValue()}},f.default.createElement(F,{icon:"cross-icon",color:"black",size:8})):null),B=e=>{const t={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px"},l=f.default.createElement("div",{style:{...t,backgroundColor:e?.data?.color??V.primary["primary-1"]}},f.default.createElement(F,{icon:"check-icon",color:"white"})),o=f.default.createElement("div",{style:{...t,backgroundColor:"#e0e7ff"}});return f.default.createElement(a.components.Option,e,f.default.createElement("div",{style:{display:"flex",justifyContent:"start",alignItems:"center",width:"100%"}},e.isSelected?l:o,f.default.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},I=({index:e,...t})=>{const l=t?.data?.label||"Select";return!e&&f.default.createElement("div",{className:"text-main-alt"},l)},W=({getValue:e,children:t,...l})=>{const o=e().length;return f.default.createElement(a.components.ValueContainer,l,t,o>1&&f.default.createElement("div",{className:"text-more-alt"},"& ",o-1," more"))},P={control:(e,t)=>({...e,border:s?"1px solid "+V.border:"1px solid "+V.ui.error,height:`${d}px`,minHeight:`${d}px`,boxShadow:(t.isSelected||t.isFocused)&&"none"}),placeholder:e=>({...e,fontSize:u+"px",marginLeft:"0px"}),dropdownIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),clearIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,fontSize:u+"px"}),indicatorsContainer:e=>({...e,padding:0,height:`${d}px`}),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%"}),singleValue:e=>({...e,fontSize:u+"px",marginLeft:"0px",width:"auto"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto"}),input:e=>({...e,fontSize:u+"px"}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?V.neutral["neutral-5"]:V.bgColor,padding:"10px",cursor:"pointer",color:"#081348",width:"100%"}),...k.styles};return f.default.createElement(Bt,{style:y,isValid:s,fontSize:u,theme:V},e&&f.default.createElement(It,{inBuiltCss:L,labelWrapperStyle:"selectComp-label-wrapper",style:x},f.default.createElement(pt,{customStyles:t,type:"label-text",text:e,style:{marginBottom:"7px",paddingBottom:"0px"}}),A&&f.default.createElement("div",{style:{marginLeft:"4px",color:`${V.ui.error}`}},"*")),"multiSelect"===C?f.default.createElement(b.default,v({components:{DropdownIndicator:M,MultiValue:I,Option:B,ValueContainer:W,IndicatorSeparator:()=>null,ClearIndicator:R},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",id:E,onChange:i,placeholder:n,value:r,options:o,styles:P,isMulti:!0,isDisabled:S,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:w,isClearable:c},k)):"asyncSingleSelect"===C?f.default.createElement(h.default,v({loadOptions:p,defaultOptions:!0,onInputChange:m,styles:P,components:{DropdownIndicator:M,IndicatorSeparator:()=>null,ClearIndicator:R},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",id:E,placeholder:n,onChange:i,isLoading:w,isDisabled:S,isClearable:c},k)):"asyncMultiSelect"===C?f.default.createElement(h.default,v({components:{DropdownIndicator:M,MultiValue:I,ValueContainer:W,Option:B,IndicatorSeparator:()=>null,ClearIndicator:R},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",id:E,onChange:i,placeholder:n,styles:P,isMulti:!0,isDisabled:S,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:w,loadOptions:p,defaultOptions:!0,onInputChange:m,isClearable:c},k)):f.default.createElement(b.default,v({components:{DropdownIndicator:M,IndicatorSeparator:()=>null,ClearIndicator:R},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",id:E,options:o,placeholder:n,isDisabled:S,value:{value:r?r.value:"",label:r?r.label:""},styles:P,onChange:i,isLoading:w,isClearable:c},k)))};Pt.propTypes={label:p.default.string,labelStyle:p.default.object,optionArr:p.default.array,selectedValue:p.default.object,setSelectedValue:p.default.func,placeHolder:p.default.string,fontSize:p.default.number,clearSelected:p.default.func,loadOptions:p.default.func,onInputChange:p.default.func,customWrapperStyles:p.default.object,customLabelStyles:p.default.object,isRequired:p.default.bool,dropdownType:p.default.string,isDisabled:p.default.bool,isLoading:p.default.bool,isValid:p.default.bool,height:p.default.number,isClearable:p.default.bool,id:p.default.string},Pt.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:""};const Lt=m.default.div`
1350
+ `,Pt=({label:e,labelStyle:t,optionArr:o,selectedValue:r,setSelectedValue:i,placeHolder:n,isClearable:c,isValid:s,height:d,fontSize:u,loadOptions:p,onInputChange:m,clearSelected:g,customWrapperStyles:y,customLabelStyles:x,isRequired:A,dropdownType:C,isDisabled:S,isLoading:w,id:E,iconName:k,iconColor:V,iconSize:M,showIndicator:R,leftIcon:B,leftIconColor:I,leftIconSize:W,...P})=>{const T=l.useTheme()||z,q=e=>{const t=f.default.createElement(a.components.DropdownIndicator,e,f.default.createElement(Wt,null,f.default.createElement(F,{icon:k,color:V,size:M})));return!0===R?t:null},H=e=>f.default.createElement(a.components.ClearIndicator,e,c?f.default.createElement(Wt,{onClick:()=>{g(),e.clearValue()}},f.default.createElement(F,{icon:"cross-icon",color:"black",size:8})):null),j=e=>{const t={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},l=f.default.createElement("div",{style:{...t,backgroundColor:e?.data?.color??T.primary["primary-1"]}},f.default.createElement(F,{icon:"check-icon",color:"white"})),o=f.default.createElement("div",{style:{...t,backgroundColor:"#e0e7ff"}});return f.default.createElement(a.components.Option,e,f.default.createElement("div",{style:{display:"flex",justifyContent:"start",alignItems:"center",width:"100%"}},e.isSelected?l:o,f.default.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...t})=>{const l=t?.data?.label||"Select";return!e&&f.default.createElement("div",{className:"text-main-alt"},l)},O=({getValue:e,children:t,...l})=>{const o=e().length;return f.default.createElement(a.components.ValueContainer,l,t,o>1&&f.default.createElement("div",{className:"text-more-alt"},"& ",o-1," more"))},X={control:(e,t)=>({...e,border:s?"1px solid "+T.border:"1px solid "+T.ui.error,minWidth:"215px",height:`${d}px`,minHeight:`${d}px`,boxShadow:(t.isSelected||t.isFocused)&&"none"}),placeholder:e=>({...e,fontSize:u+"px",marginLeft:"0px"}),dropdownIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),clearIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,display:"flex",fontSize:u+"px"}),indicatorsContainer:e=>({...e,padding:0,height:`${d}px`}),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%"}),singleValue:e=>({...e,fontSize:u+"px",marginLeft:"0px",width:"auto"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto"}),input:e=>({...e,fontSize:u+"px"}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?T.neutral["neutral-5"]:T.bgColor,padding:"10px",cursor:"pointer",color:"#081348",width:"inherit"}),...P.styles};return f.default.createElement(Bt,{style:y,isValid:s,fontSize:u,theme:T},e&&f.default.createElement(It,{inBuiltCss:L,labelWrapperStyle:"selectComp-label-wrapper",style:x},f.default.createElement(pt,{customStyles:t,type:"label-text",text:e,style:{marginBottom:"7px",paddingBottom:"0px"}}),A&&f.default.createElement("div",{style:{marginLeft:"4px",color:`${T.ui.error}`}},"*")),"multiSelect"===C?f.default.createElement(b.default,v({components:{DropdownIndicator:q,MultiValue:G,Option:j,ValueContainer:O,IndicatorSeparator:()=>null,ClearIndicator:H},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",onChange:i,placeholder:n,value:r,options:o,styles:X,isMulti:!0,isDisabled:S,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:w,id:E,isClearable:c},P)):"asyncSingleSelect"===C?f.default.createElement(h.default,v({loadOptions:p,defaultOptions:!0,onInputChange:m,styles:X,components:{DropdownIndicator:q,ValueContainer:O,IndicatorSeparator:()=>null,ClearIndicator:H},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",placeholder:n,onChange:i,isLoading:w,isDisabled:S,id:E,isClearable:c},P)):"asyncMultiSelect"===C?f.default.createElement(h.default,v({components:{DropdownIndicator:q,MultiValue:G,ValueContainer:O,Option:j,IndicatorSeparator:()=>null,ClearIndicator:H},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",onChange:i,placeholder:n,styles:X,isMulti:!0,isDisabled:S,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:w,loadOptions:p,defaultOptions:!0,onInputChange:m,id:E,isClearable:c},P)):f.default.createElement(b.default,v({components:{DropdownIndicator:q,ValueContainer:O,IndicatorSeparator:()=>null,ClearIndicator:H},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",options:o,placeholder:n,isDisabled:S,value:{value:r?r.value:"",label:r?r.label:""},styles:X,onChange:i,isLoading:w,id:E,isClearable:c},P)))};Pt.propTypes={label:p.default.string,labelStyle:p.default.object,optionArr:p.default.array,selectedValue:p.default.object,setSelectedValue:p.default.func,placeHolder:p.default.string,fontSize:p.default.number,clearSelected:p.default.func,loadOptions:p.default.func,onInputChange:p.default.func,customWrapperStyles:p.default.object,customLabelStyles:p.default.object,isRequired:p.default.bool,dropdownType:p.default.string,isDisabled:p.default.bool,isLoading:p.default.bool,isValid:p.default.bool,height:p.default.number,isClearable:p.default.bool,id:p.default.string,iconName:p.default.string,iconColor:p.default.string,iconSize:p.default.number,leftIcon:p.default.string,leftIconColor:p.default.string,leftIconSize:p.default.number,showIndicator:p.default.bool},Pt.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:"magnifier-icon",leftIconColor:"black",leftIconSize:10,showIndicator:!0};const Lt=m.default.div`
1351
1351
  //Set the styles from the default styles object
1352
1352
  ${({inBuiltCss:e,defaultStyles:t})=>be(e,t)}
1353
1353
 
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.0",
4
+ "version": "1.2.1",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
7
7
  "private": false,