groundfloor-react-ui 1.3.16 → 1.3.18

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
@@ -443,14 +443,10 @@ ${({customStyles:e})=>e}
443
443
  //Set the styles from the default styles object
444
444
  ${({theme:e,defaultStyle:t})=>T(e,t)}
445
445
  &:disabled {
446
- color: ${({disableColor:e})=>e||"#929eac"};
447
- border: none;
446
+ color: #929eac;
447
+ border: 1px solid ${({theme:e})=>e.neutral["neutral-3"]};
448
448
  cursor: not-allowed;
449
- svg {
450
- path {
451
- fill: ${({theme:e,disabled:t,disableColor:l})=>t&&l?l:e.variant["neutral-1"]};
452
- }
453
- }
449
+ ${({disableStyle:e})=>e}
454
450
  }
455
451
  &:hover {
456
452
  background-color: ${({theme:e,disabled:t,btnStyle:l})=>!t&&(l.color?l.color:e.primary["primary-1"])};
@@ -458,14 +454,14 @@ ${({customStyles:e})=>e}
458
454
 
459
455
  svg {
460
456
  path {
461
- fill: ${({theme:e,disabled:t,btnStyle:l,disableColor:o})=>t?o||e.variant["neutral-1"]:l.color?l.backgroundColor:e.variant.white};
457
+ fill: ${({theme:e,disabled:t,btnStyle:l})=>!t&&(l.color?l.backgroundColor:e.variant.white)};
462
458
  }
463
459
  }
464
460
  }
465
461
 
466
462
  // custom styles
467
463
  ${({btnStyle:e})=>e}
468
- `,we=({btnStyle:e,isLoading:l,block:o,size:r,style:a,disabled:n,type:c,theme:s,id:d,disableColor:p,...m})=>{const u=b()||R,[g,f]=i(e.color?e.color:u.variant["primary-1"]);return t.createElement(Ae,z({id:d,block:o,defaultStyle:"button",style:a,size:r,disabled:n,type:c,btnStyle:e,isLoading:l,theme:s,disableColor:p,onMouseEnter:()=>!n&&f(e.backgroundColor?e.backgroundColor:u.variant.white),onMouseLeave:()=>!n&&f(e.color?e.color:u.variant["primary-1"])},m),l&&t.createElement("div",{style:{paddingRight:"10px",display:"flex",justifyContent:"center",alignItems:"center"}},t.createElement(pe,{theme:s,customStyles:{"background-color":g},size:16})," "),m.children," ")};we.propTypes={disabled:e.bool,size:e.oneOf(["sm","md","lg"]),block:e.bool,onClick:e.func,theme:e.object,type:e.string,btnStyle:e.object,id:e.string,disableColor:e.string},Ae.defaultProps={theme:R},we.defaultProps={theme:R,block:!1,disabled:!1,size:"md",onClick:void 0,btnStyle:{},id:"",disableColor:""};const Se=m.button`
464
+ `,we=({btnStyle:e,isLoading:l,block:o,size:r,style:a,disabled:n,type:c,theme:s,id:d,disableStyle:p,...m})=>{const u=b()||R,[g,f]=i(e.color?e.color:u.variant["primary-1"]);return t.createElement(Ae,z({id:d,block:o,defaultStyle:"button",style:a,size:r,disabled:n,type:c,btnStyle:e,isLoading:l,theme:s,disableStyle:p,onMouseEnter:()=>!n&&f(e.backgroundColor?e.backgroundColor:u.variant.white),onMouseLeave:()=>!n&&f(e.color?e.color:u.variant["primary-1"])},m),l&&t.createElement("div",{style:{paddingRight:"10px",display:"flex",justifyContent:"center",alignItems:"center"}},t.createElement(pe,{theme:s,customStyles:{"background-color":g},size:16})," "),m.children," ")};we.propTypes={disabled:e.bool,size:e.oneOf(["sm","md","lg"]),block:e.bool,onClick:e.func,theme:e.object,type:e.string,btnStyle:e.object,id:e.string,disableStyle:e.object},Ae.defaultProps={theme:R},we.defaultProps={theme:R,block:!1,disabled:!1,size:"md",onClick:void 0,btnStyle:{},id:"",disableStyle:{}};const Se=m.button`
469
465
  background-color: ${({theme:e})=>e.primary["primary-1"]};
470
466
  color: ${({theme:e})=>e.additional.white};
471
467
  padding: 3px 14px;
@@ -753,7 +749,7 @@ ${({customTriggerStyle:e})=>e}
753
749
  ${({inputContainerStyle:e})=>e};
754
750
  `,rt=m.div`
755
751
  background-color: ${({theme:e})=>e.variant["selection-bg"]};
756
- color: ${({theme:e})=>e.variant["neutral-1"]} ;
752
+ color: ${({theme:e})=>e.variant["neutral-1"]};
757
753
  border-radius: 4px;
758
754
  padding: 4px 8px;
759
755
  margin-right: 8px;
@@ -787,7 +783,7 @@ ${({customTriggerStyle:e})=>e}
787
783
  `,ct=m.span`
788
784
  color: ${({theme:e})=>e.variant.error};
789
785
  ${({errorTextStyle:e})=>e};
790
- `,st=({listChips:e,setListChips:l,currentChip:o,setCurrentChip:a,chipListString:n,placeholder:c,validationCheck:s,errorMsg:d,handleBlurProps:p,label:m,labelCusTomStyles:u,containerStyle:g,inputContainerStyle:f,errorTextStyle:h,multipleItemsValidator:y,disabled:x,...C})=>{let v=n?n.split(","):e||[];const[A,w]=i(v),[S,k]=i(o),[E,V]=i(""),M=b()||R;r((()=>{w(v)}),[]);return t.createElement(ot,{theme:M,containerStyle:g},t.createElement(it,{inputContainerStyle:f},t.createElement(lt,{text:m,customStyles:u}),A.map(((e,l)=>t.createElement(rt,{theme:M,key:e+`${l}`,onClick:()=>(e=>{const t=[...A];t.splice(e,1),w(t),V("")})(l)},t.createElement(at,null,e)))),t.createElement(nt,{type:"text",placeholder:c,value:S,onKeyDown:e=>{let t=s(S,A);"Enter"===e.key||","===e.key?(e.preventDefault(),t?S.trim()&&(w([...A,S.trim()]),k(""),V("")):V(d)):"Backspace"!==e.key||S||w(A.slice(0,-1))},onChange:e=>{k(e.target.value),V("")},theme:M,onBlur:()=>{const e=s(S,A);if(e&&S.trim()){const e=[...A,S.trim()];p(e.join(",")),w(e),k("")}else e||V(d)},onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain"),l=y(t,A);if(l&&l.length>0){const e=[...A,...l];w(e)}k("")},disabled:x})),E&&t.createElement(ct,{errorTextStyle:h,theme:M},E))};st.propTypes={listChips:e.arrayOf(e.string),setListChips:e.func,chipListString:e.string,currentChip:e.string,setCurrentChip:e.func,placeholder:e.string,validationCheck:e.func.isRequired,errorMsg:e.string,label:e.string,labelCusTomStyles:e.object,containerStyle:e.object,inputContainerStyle:e.object,errorTextStyle:e.object,disabled:e.bool},st.defaultProps={listChips:[],setListChips:()=>{},currentChip:"",setCurrentChip:()=>{},placeholder:"",errorMsg:"Please enter a valid email address",label:"From:",labelCusTomStyles:{},containerStyle:{},inputContainerStyle:{},errorTextStyle:{},disabled:!1};const dt=m.div`
786
+ `,st=({listChips:e,setListChips:l,currentChip:o,setCurrentChip:a,chipListString:n,placeholder:c,validationCheck:s,errorMsg:d,handleBlurProps:p,label:m,labelCusTomStyles:u,containerStyle:g,inputContainerStyle:f,errorTextStyle:h,multipleItemsValidator:y,disabled:x,...C})=>{let v=n?n.split(","):e||[];const[A,w]=i(v),[S,k]=i(o),[E,V]=i(""),M=b()||R;r((()=>{w(v)}),[]);return t.createElement(ot,{theme:M,containerStyle:g},t.createElement(it,{inputContainerStyle:f},t.createElement(lt,{text:m,customStyles:u}),A.map(((e,l)=>t.createElement(rt,{theme:M,key:e+`${l}`,onClick:()=>(e=>{const t=[...A];t.splice(e,1),w(t),V("")})(l)},t.createElement(at,null,e)))),t.createElement(nt,{type:"text",placeholder:c,value:S,onKeyDown:e=>{let t=s(S,A);"Enter"===e.key||","===e.key?(e.preventDefault(),t?S.trim()&&(w([...A,S.trim()]),k(""),V("")):V(d)):"Backspace"!==e.key||S||w(A.slice(0,-1))},onChange:e=>{k(e.target.value),V("")},theme:M,onBlur:()=>{const e=s(S,A);if(e&&S.trim()){let e;e=S.trim()?[...A,S.trim()]:[...A],p(e.join(",")),w(e),k("")}else e||V(d)},onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain"),l=y(t,A);if(l&&l.length>0){const e=[...A,...l];w(e)}k("")},disabled:x})),E&&t.createElement(ct,{errorTextStyle:h,theme:M},E))};st.propTypes={listChips:e.arrayOf(e.string),setListChips:e.func,chipListString:e.string,currentChip:e.string,setCurrentChip:e.func,placeholder:e.string,validationCheck:e.func.isRequired,errorMsg:e.string,label:e.string,labelCusTomStyles:e.object,containerStyle:e.object,inputContainerStyle:e.object,errorTextStyle:e.object,disabled:e.bool},st.defaultProps={listChips:[],setListChips:()=>{},currentChip:"",setCurrentChip:()=>{},placeholder:"",errorMsg:"Please enter a valid email address",label:"From:",labelCusTomStyles:{},containerStyle:{},inputContainerStyle:{},errorTextStyle:{},disabled:!1};const dt=m.div`
791
787
  box-sizing: initial;
792
788
 
793
789
  //Set the styles from the default styles object
package/dist/index.js CHANGED
@@ -443,14 +443,10 @@ ${({customStyles:e})=>e}
443
443
  //Set the styles from the default styles object
444
444
  ${({theme:e,defaultStyle:t})=>P(e,t)}
445
445
  &:disabled {
446
- color: ${({disableColor:e})=>e||"#929eac"};
447
- border: none;
446
+ color: #929eac;
447
+ border: 1px solid ${({theme:e})=>e.neutral["neutral-3"]};
448
448
  cursor: not-allowed;
449
- svg {
450
- path {
451
- fill: ${({theme:e,disabled:t,disableColor:l})=>t&&l?l:e.variant["neutral-1"]};
452
- }
453
- }
449
+ ${({disableStyle:e})=>e}
454
450
  }
455
451
  &:hover {
456
452
  background-color: ${({theme:e,disabled:t,btnStyle:l})=>!t&&(l.color?l.color:e.primary["primary-1"])};
@@ -458,14 +454,14 @@ ${({customStyles:e})=>e}
458
454
 
459
455
  svg {
460
456
  path {
461
- fill: ${({theme:e,disabled:t,btnStyle:l,disableColor:a})=>t?a||e.variant["neutral-1"]:l.color?l.backgroundColor:e.variant.white};
457
+ fill: ${({theme:e,disabled:t,btnStyle:l})=>!t&&(l.color?l.backgroundColor:e.variant.white)};
462
458
  }
463
459
  }
464
460
  }
465
461
 
466
462
  // custom styles
467
463
  ${({btnStyle:e})=>e}
468
- `,xe=({btnStyle:e,isLoading:a,block:o,size:r,style:i,disabled:n,type:c,theme:d,id:s,disableColor:u,...p})=>{const f=l.useTheme()||H,[m,b]=t.useState(e.color?e.color:f.variant["primary-1"]);return g.default.createElement(ye,E({id:s,block:o,defaultStyle:"button",style:i,size:r,disabled:n,type:c,btnStyle:e,isLoading:a,theme:d,disableColor:u,onMouseEnter:()=>!n&&b(e.backgroundColor?e.backgroundColor:f.variant.white),onMouseLeave:()=>!n&&b(e.color?e.color:f.variant["primary-1"])},p),a&&g.default.createElement("div",{style:{paddingRight:"10px",display:"flex",justifyContent:"center",alignItems:"center"}},g.default.createElement(ne,{theme:d,customStyles:{"background-color":m},size:16})," "),p.children," ")};xe.propTypes={disabled:b.default.bool,size:b.default.oneOf(["sm","md","lg"]),block:b.default.bool,onClick:b.default.func,theme:b.default.object,type:b.default.string,btnStyle:b.default.object,id:b.default.string,disableColor:b.default.string},ye.defaultProps={theme:H},xe.defaultProps={theme:H,block:!1,disabled:!1,size:"md",onClick:void 0,btnStyle:{},id:"",disableColor:""};const Ce=h.default.button`
464
+ `,xe=({btnStyle:e,isLoading:a,block:o,size:r,style:i,disabled:n,type:c,theme:d,id:s,disableStyle:u,...p})=>{const f=l.useTheme()||H,[m,b]=t.useState(e.color?e.color:f.variant["primary-1"]);return g.default.createElement(ye,E({id:s,block:o,defaultStyle:"button",style:i,size:r,disabled:n,type:c,btnStyle:e,isLoading:a,theme:d,disableStyle:u,onMouseEnter:()=>!n&&b(e.backgroundColor?e.backgroundColor:f.variant.white),onMouseLeave:()=>!n&&b(e.color?e.color:f.variant["primary-1"])},p),a&&g.default.createElement("div",{style:{paddingRight:"10px",display:"flex",justifyContent:"center",alignItems:"center"}},g.default.createElement(ne,{theme:d,customStyles:{"background-color":m},size:16})," "),p.children," ")};xe.propTypes={disabled:b.default.bool,size:b.default.oneOf(["sm","md","lg"]),block:b.default.bool,onClick:b.default.func,theme:b.default.object,type:b.default.string,btnStyle:b.default.object,id:b.default.string,disableStyle:b.default.object},ye.defaultProps={theme:H},xe.defaultProps={theme:H,block:!1,disabled:!1,size:"md",onClick:void 0,btnStyle:{},id:"",disableStyle:{}};const Ce=h.default.button`
469
465
  background-color: ${({theme:e})=>e.primary["primary-1"]};
470
466
  color: ${({theme:e})=>e.additional.white};
471
467
  padding: 3px 14px;
@@ -753,7 +749,7 @@ ${({customTriggerStyle:e})=>e}
753
749
  ${({inputContainerStyle:e})=>e};
754
750
  `,tt=h.default.div`
755
751
  background-color: ${({theme:e})=>e.variant["selection-bg"]};
756
- color: ${({theme:e})=>e.variant["neutral-1"]} ;
752
+ color: ${({theme:e})=>e.variant["neutral-1"]};
757
753
  border-radius: 4px;
758
754
  padding: 4px 8px;
759
755
  margin-right: 8px;
@@ -787,7 +783,7 @@ ${({customTriggerStyle:e})=>e}
787
783
  `,ot=h.default.span`
788
784
  color: ${({theme:e})=>e.variant.error};
789
785
  ${({errorTextStyle:e})=>e};
790
- `,rt=({listChips:e,setListChips:a,currentChip:o,setCurrentChip:r,chipListString:i,placeholder:n,validationCheck:c,errorMsg:d,handleBlurProps:s,label:u,labelCusTomStyles:p,containerStyle:f,inputContainerStyle:m,errorTextStyle:b,multipleItemsValidator:h,disabled:y,...x})=>{let C=i?i.split(","):e||[];const[v,A]=t.useState(C),[w,S]=t.useState(o),[k,E]=t.useState(""),V=l.useTheme()||H;t.useEffect((()=>{A(C)}),[]);return g.default.createElement(_e,{theme:V,containerStyle:f},g.default.createElement(et,{inputContainerStyle:m},g.default.createElement($e,{text:u,customStyles:p}),v.map(((e,t)=>g.default.createElement(tt,{theme:V,key:e+`${t}`,onClick:()=>(e=>{const t=[...v];t.splice(e,1),A(t),E("")})(t)},g.default.createElement(lt,null,e)))),g.default.createElement(at,{type:"text",placeholder:n,value:w,onKeyDown:e=>{let t=c(w,v);"Enter"===e.key||","===e.key?(e.preventDefault(),t?w.trim()&&(A([...v,w.trim()]),S(""),E("")):E(d)):"Backspace"!==e.key||w||A(v.slice(0,-1))},onChange:e=>{S(e.target.value),E("")},theme:V,onBlur:()=>{const e=c(w,v);if(e&&w.trim()){const e=[...v,w.trim()];s(e.join(",")),A(e),S("")}else e||E(d)},onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain"),l=h(t,v);if(l&&l.length>0){const e=[...v,...l];A(e)}S("")},disabled:y})),k&&g.default.createElement(ot,{errorTextStyle:b,theme:V},k))};rt.propTypes={listChips:b.default.arrayOf(b.default.string),setListChips:b.default.func,chipListString:b.default.string,currentChip:b.default.string,setCurrentChip:b.default.func,placeholder:b.default.string,validationCheck:b.default.func.isRequired,errorMsg:b.default.string,label:b.default.string,labelCusTomStyles:b.default.object,containerStyle:b.default.object,inputContainerStyle:b.default.object,errorTextStyle:b.default.object,disabled:b.default.bool},rt.defaultProps={listChips:[],setListChips:()=>{},currentChip:"",setCurrentChip:()=>{},placeholder:"",errorMsg:"Please enter a valid email address",label:"From:",labelCusTomStyles:{},containerStyle:{},inputContainerStyle:{},errorTextStyle:{},disabled:!1};const it=h.default.div`
786
+ `,rt=({listChips:e,setListChips:a,currentChip:o,setCurrentChip:r,chipListString:i,placeholder:n,validationCheck:c,errorMsg:d,handleBlurProps:s,label:u,labelCusTomStyles:p,containerStyle:f,inputContainerStyle:m,errorTextStyle:b,multipleItemsValidator:h,disabled:y,...x})=>{let C=i?i.split(","):e||[];const[v,A]=t.useState(C),[w,S]=t.useState(o),[k,E]=t.useState(""),V=l.useTheme()||H;t.useEffect((()=>{A(C)}),[]);return g.default.createElement(_e,{theme:V,containerStyle:f},g.default.createElement(et,{inputContainerStyle:m},g.default.createElement($e,{text:u,customStyles:p}),v.map(((e,t)=>g.default.createElement(tt,{theme:V,key:e+`${t}`,onClick:()=>(e=>{const t=[...v];t.splice(e,1),A(t),E("")})(t)},g.default.createElement(lt,null,e)))),g.default.createElement(at,{type:"text",placeholder:n,value:w,onKeyDown:e=>{let t=c(w,v);"Enter"===e.key||","===e.key?(e.preventDefault(),t?w.trim()&&(A([...v,w.trim()]),S(""),E("")):E(d)):"Backspace"!==e.key||w||A(v.slice(0,-1))},onChange:e=>{S(e.target.value),E("")},theme:V,onBlur:()=>{const e=c(w,v);if(e&&w.trim()){let e;e=w.trim()?[...v,w.trim()]:[...v],s(e.join(",")),A(e),S("")}else e||E(d)},onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain"),l=h(t,v);if(l&&l.length>0){const e=[...v,...l];A(e)}S("")},disabled:y})),k&&g.default.createElement(ot,{errorTextStyle:b,theme:V},k))};rt.propTypes={listChips:b.default.arrayOf(b.default.string),setListChips:b.default.func,chipListString:b.default.string,currentChip:b.default.string,setCurrentChip:b.default.func,placeholder:b.default.string,validationCheck:b.default.func.isRequired,errorMsg:b.default.string,label:b.default.string,labelCusTomStyles:b.default.object,containerStyle:b.default.object,inputContainerStyle:b.default.object,errorTextStyle:b.default.object,disabled:b.default.bool},rt.defaultProps={listChips:[],setListChips:()=>{},currentChip:"",setCurrentChip:()=>{},placeholder:"",errorMsg:"Please enter a valid email address",label:"From:",labelCusTomStyles:{},containerStyle:{},inputContainerStyle:{},errorTextStyle:{},disabled:!1};const it=h.default.div`
791
787
  box-sizing: initial;
792
788
 
793
789
  //Set the styles from the default styles object
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.3.16",
4
+ "version": "1.3.18",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
7
7
  "private": false,