groundfloor-react-ui 1.3.21 → 1.3.23
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 +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -783,7 +783,7 @@ ${({customTriggerStyle:e})=>e}
|
|
|
783
783
|
`,ct=m.span`
|
|
784
784
|
color: ${({theme:e})=>e.variant.error};
|
|
785
785
|
${({errorTextStyle:e})=>e};
|
|
786
|
-
`,st=({listChips:e,setListChips:l,currentChip:o,setCurrentChip:a,chipListString:n,placeholder:c,errorMsg:s,handleBlurProps:d,label:p,labelCusTomStyles:m,containerStyle:u,inputContainerStyle:g,errorTextStyle:f,disabled:h,isValid:y,handleInputKeyDownProps:x,handleInputChangeProps:C,...v})=>{let A=n?n.split(","):e||[];const[w,S]=i(A),[k,E]=i(o),[V,M]=i(""),z=b()||R;r((()=>{S(A)}),[]);return t.createElement(ot,{theme:z,containerStyle:u},t.createElement(it,{inputContainerStyle:g},t.createElement(lt,{text:p,customStyles:m}),w.map(((e,l)=>t.createElement(rt,{theme:z,key:e+`${l}`,onClick:()=>(e=>{const t=[...w];t.splice(e,1),S(t),M(""),d(t.join(","))})(l)},t.createElement(at,null,e)))),t.createElement(nt,{type:"text",placeholder:c,value:k,onKeyDown:e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),y?k.trim()&&(S([...w,k.trim()]),E(""),M("")):M(s)):"Backspace"!==e.key||k||
|
|
786
|
+
`,st=({listChips:e,setListChips:l,currentChip:o,setCurrentChip:a,chipListString:n,placeholder:c,errorMsg:s,handleBlurProps:d,label:p,labelCusTomStyles:m,containerStyle:u,inputContainerStyle:g,errorTextStyle:f,disabled:h,isValid:y,handleInputKeyDownProps:x,handleInputChangeProps:C,...v})=>{let A=n?n.split(","):e||[];const[w,S]=i(A),[k,E]=i(o),[V,M]=i(""),z=b()||R;r((()=>{S(A)}),[]);return t.createElement(ot,{theme:z,containerStyle:u},t.createElement(it,{inputContainerStyle:g},t.createElement(lt,{text:p,customStyles:m}),w.map(((e,l)=>t.createElement(rt,{theme:z,key:e+`${l}`,onClick:()=>(e=>{const t=[...w];t.splice(e,1),S(t),M(""),d(t.join(","))})(l)},t.createElement(at,null,e)))),t.createElement(nt,{type:"text",placeholder:c,value:k,onKeyDown:e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),y?k.trim()&&(x([...w,k.trim()].join(",")),S([...w,k.trim()]),E(""),M("")):M(s)):"Backspace"!==e.key||k||(x(w.slice(0,-1).join(",")),S(w.slice(0,-1)))},onChange:e=>{E(e.target.value),M(""),C(e.target.value)},theme:z,onBlur:()=>{if(y){let e;e=k.trim()?[...w,k.trim()]:[...w],d(e.join(",")),S(e),E("")}else y||M(s)},disabled:h})),V&&t.createElement(ct,{errorTextStyle:f,theme:z},V))};st.propTypes={listChips:e.arrayOf(e.string),setListChips:e.func,chipListString:e.string,currentChip:e.string,setCurrentChip:e.func,placeholder:e.string,isValid:e.bool,errorMsg:e.string,label:e.string,labelCusTomStyles:e.object,containerStyle:e.object,inputContainerStyle:e.object,errorTextStyle:e.object,disabled:e.bool,handleInputKeyDownProps:e.func,handleInputChangeProps:e.func},st.defaultProps={listChips:[],setListChips:()=>{},currentChip:"",setCurrentChip:()=>{},placeholder:"",errorMsg:"Please enter a valid email address",label:"From:",labelCusTomStyles:{},containerStyle:{},inputContainerStyle:{},errorTextStyle:{},disabled:!1,isValid:!0};const dt=m.div`
|
|
787
787
|
box-sizing: initial;
|
|
788
788
|
|
|
789
789
|
//Set the styles from the default styles object
|
|
@@ -1967,7 +1967,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1967
1967
|
`,fo=m.div`
|
|
1968
1968
|
width: 100%;
|
|
1969
1969
|
margin-left: 16px;
|
|
1970
|
-
`,ho=({commentsArray:e,customStyles:l,myInfoAvatarProps:o,loading:r,viewOnly:a,textInputProps:n,saveBtnProps:c,cancelBtnProps:s,loadMore:d,avatarProps:p,message:m})=>{const u=b()||R,[g,f]=i(!1),[h,y]=i(e||[]),x=async e=>{let t;t="post"===e?await c.callback():await d.callback(),y((e=>[...e,...t]))};return t.createElement(co,{commentWrapperStyle:l?.commentWrapperStyle,theme:u},h.map(((e,o)=>{const{name:i,date:r,comment:a,image:n}=e;return t.createElement(so,{key:o,commentBodyStyle:l?.commentBodyStyle,theme:u},t.createElement(po,{commentHeadStyle:l?.commentHeadStyle},t.createElement(He,z({user:{fullName:i,userName:i,url:n},toggleName:!0,size:"LG",customStylesName:{color:u.additional["text-color"]}},p)),t.createElement(mo,{dateTimeStyle:l?.dateTimeStyle,theme:u},r)),t.createElement(bo,{commentDivStyle:l?.commentDivStyle},a))})),!r&&0===h.length&&m,r&&t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"24px"}},t.createElement(ue,{size:25})),!r&&d.showLoadMore&&t.createElement("div",{className:"load-more"},t.createElement(he,{onClick:()=>x("load")},"Load more")),!a&&t.createElement(uo,{theme:u,inputWrapperStyle:l?.inputWrapperStyle},t.createElement(He,z({toggleName:!1,customStylesImage:{height:"36px",width:"36px"},customStylesContainer:{marginTop:"7px"}},o)),t.createElement(fo,null,t.createElement(
|
|
1970
|
+
`,ho=({commentsArray:e,customStyles:l,myInfoAvatarProps:o,loading:r,viewOnly:a,textInputProps:n,saveBtnProps:c,cancelBtnProps:s,loadMore:d,avatarProps:p,message:m})=>{const u=b()||R,[g,f]=i(!1),[h,y]=i(e||[]),x=async e=>{let t;t="post"===e?await c.callback():await d.callback(),y((e=>[...e,...t]))};return t.createElement(co,{commentWrapperStyle:l?.commentWrapperStyle,theme:u},h.map(((e,o)=>{const{name:i,date:r,comment:a,image:n}=e;return t.createElement(so,{key:o,commentBodyStyle:l?.commentBodyStyle,theme:u},t.createElement(po,{commentHeadStyle:l?.commentHeadStyle},t.createElement(He,z({user:{fullName:i,userName:i,url:n},toggleName:!0,size:"LG",customStylesName:{color:u.additional["text-color"]}},p)),t.createElement(mo,{dateTimeStyle:l?.dateTimeStyle,theme:u},r)),t.createElement(bo,{commentDivStyle:l?.commentDivStyle},a))})),!r&&0===h.length&&m,r&&t.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"24px"}},t.createElement(ue,{size:25})),!r&&d.showLoadMore&&t.createElement("div",{className:"load-more"},t.createElement(he,{onClick:()=>x("load")},"Load more")),!a&&t.createElement(uo,{theme:u,inputWrapperStyle:l?.inputWrapperStyle},t.createElement(He,z({toggleName:!1,customStylesImage:{height:"36px",width:"36px"},customStylesContainer:{marginTop:"7px"}},o)),t.createElement(fo,null,t.createElement(Yl,z({onChange:e=>{n.setInputValue(e.target.value)},isValid:!0,onFocus:e=>f(!0)},n)),g&&t.createElement(go,null,t.createElement(Ce,z({onClick:e=>{x("post"),n.setInputValue(e.target.value)}},c),c.text),t.createElement(he,z({disabled:!(!s?.isLoading&&!c?.isLoading),onClick:()=>{f(!1),n.setInputValue(""),n.setValidValue({isValid:!0,errMsg:""})},btnStyle:{color:u.variant["neutral-1"]}},s),s.text)))))};ho.propTypes={commentsArray:e.array,customStyles:e.object,myInfoAvatarProps:e.object,viewOnly:e.bool,textInputProps:e.object,saveBtnProps:e.object,cancelBtnProps:e.object,loadMore:e.object,avatarProps:e.object,message:e.element},ho.defaultProps={commentsArray:[],customStyles:{commentBodyStyle:{},commentWrapperStyle:{},commentHeadStyle:{},dateTimeStyle:{},commentDivStyle:{},inputWrapperStyle:{}},myInfoAvatarProps:{},loading:!1,viewOnly:!1,textInputProps:{},saveBtnProps:{size:"sm",text:"Save"},cancelBtnProps:{size:"sm",text:"Cancel"},loadMore:{showLoadMore:!1,callback:()=>{}},avatarProps:{},message:t.createElement("span",{style:{textAlign:"center",display:"block",marginBottom:"16px"}},"No comments yet")};const yo=m.div`
|
|
1971
1971
|
//Set the styles from the default styles object
|
|
1972
1972
|
${({theme:e,type:t})=>T(e,t)}
|
|
1973
1973
|
@media (max-width: 980px) {
|
package/dist/index.js
CHANGED
|
@@ -783,7 +783,7 @@ ${({customTriggerStyle:e})=>e}
|
|
|
783
783
|
`,ot=h.default.span`
|
|
784
784
|
color: ${({theme:e})=>e.variant.error};
|
|
785
785
|
${({errorTextStyle:e})=>e};
|
|
786
|
-
`,rt=({listChips:e,setListChips:a,currentChip:o,setCurrentChip:r,chipListString:i,placeholder:n,errorMsg:c,handleBlurProps:d,label:s,labelCusTomStyles:u,containerStyle:p,inputContainerStyle:f,errorTextStyle:m,disabled:b,isValid:h,handleInputKeyDownProps:y,handleInputChangeProps:x,...C})=>{let v=i?i.split(","):e||[];const[A,w]=t.useState(v),[S,k]=t.useState(o),[E,V]=t.useState(""),M=l.useTheme()||H;t.useEffect((()=>{w(v)}),[]);return g.default.createElement(_e,{theme:M,containerStyle:p},g.default.createElement(et,{inputContainerStyle:f},g.default.createElement($e,{text:s,customStyles:u}),A.map(((e,t)=>g.default.createElement(tt,{theme:M,key:e+`${t}`,onClick:()=>(e=>{const t=[...A];t.splice(e,1),w(t),V(""),d(t.join(","))})(t)},g.default.createElement(lt,null,e)))),g.default.createElement(at,{type:"text",placeholder:n,value:S,onKeyDown:e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),h?S.trim()&&(w([...A,S.trim()]),k(""),V("")):V(c)):"Backspace"!==e.key||S||
|
|
786
|
+
`,rt=({listChips:e,setListChips:a,currentChip:o,setCurrentChip:r,chipListString:i,placeholder:n,errorMsg:c,handleBlurProps:d,label:s,labelCusTomStyles:u,containerStyle:p,inputContainerStyle:f,errorTextStyle:m,disabled:b,isValid:h,handleInputKeyDownProps:y,handleInputChangeProps:x,...C})=>{let v=i?i.split(","):e||[];const[A,w]=t.useState(v),[S,k]=t.useState(o),[E,V]=t.useState(""),M=l.useTheme()||H;t.useEffect((()=>{w(v)}),[]);return g.default.createElement(_e,{theme:M,containerStyle:p},g.default.createElement(et,{inputContainerStyle:f},g.default.createElement($e,{text:s,customStyles:u}),A.map(((e,t)=>g.default.createElement(tt,{theme:M,key:e+`${t}`,onClick:()=>(e=>{const t=[...A];t.splice(e,1),w(t),V(""),d(t.join(","))})(t)},g.default.createElement(lt,null,e)))),g.default.createElement(at,{type:"text",placeholder:n,value:S,onKeyDown:e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),h?S.trim()&&(y([...A,S.trim()].join(",")),w([...A,S.trim()]),k(""),V("")):V(c)):"Backspace"!==e.key||S||(y(A.slice(0,-1).join(",")),w(A.slice(0,-1)))},onChange:e=>{k(e.target.value),V(""),x(e.target.value)},theme:M,onBlur:()=>{if(h){let e;e=S.trim()?[...A,S.trim()]:[...A],d(e.join(",")),w(e),k("")}else h||V(c)},disabled:b})),E&&g.default.createElement(ot,{errorTextStyle:m,theme:M},E))};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,isValid:b.default.bool,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,handleInputKeyDownProps:b.default.func,handleInputChangeProps:b.default.func},rt.defaultProps={listChips:[],setListChips:()=>{},currentChip:"",setCurrentChip:()=>{},placeholder:"",errorMsg:"Please enter a valid email address",label:"From:",labelCusTomStyles:{},containerStyle:{},inputContainerStyle:{},errorTextStyle:{},disabled:!1,isValid:!0};const it=h.default.div`
|
|
787
787
|
box-sizing: initial;
|
|
788
788
|
|
|
789
789
|
//Set the styles from the default styles object
|
|
@@ -1967,7 +1967,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1967
1967
|
`,ua=h.default.div`
|
|
1968
1968
|
width: 100%;
|
|
1969
1969
|
margin-left: 16px;
|
|
1970
|
-
`,pa=({commentsArray:e,customStyles:a,myInfoAvatarProps:o,loading:r,viewOnly:i,textInputProps:n,saveBtnProps:c,cancelBtnProps:d,loadMore:s,avatarProps:u,message:p})=>{const f=l.useTheme()||H,[m,b]=t.useState(!1),[h,y]=t.useState(e||[]),x=async e=>{let t;t="post"===e?await c.callback():await s.callback(),y((e=>[...e,...t]))};return g.default.createElement(oa,{commentWrapperStyle:a?.commentWrapperStyle,theme:f},h.map(((e,t)=>{const{name:l,date:o,comment:r,image:i}=e;return g.default.createElement(ra,{key:t,commentBodyStyle:a?.commentBodyStyle,theme:f},g.default.createElement(ia,{commentHeadStyle:a?.commentHeadStyle},g.default.createElement(ze,E({user:{fullName:l,userName:l,url:i},toggleName:!0,size:"LG",customStylesName:{color:f.additional["text-color"]}},u)),g.default.createElement(na,{dateTimeStyle:a?.dateTimeStyle,theme:f},o)),g.default.createElement(ca,{commentDivStyle:a?.commentDivStyle},r))})),!r&&0===h.length&&p,r&&g.default.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"24px"}},g.default.createElement(se,{size:25})),!r&&s.showLoadMore&&g.default.createElement("div",{className:"load-more"},g.default.createElement(fe,{onClick:()=>x("load")},"Load more")),!i&&g.default.createElement(da,{theme:f,inputWrapperStyle:a?.inputWrapperStyle},g.default.createElement(ze,E({toggleName:!1,customStylesImage:{height:"36px",width:"36px"},customStylesContainer:{marginTop:"7px"}},o)),g.default.createElement(ua,null,g.default.createElement(
|
|
1970
|
+
`,pa=({commentsArray:e,customStyles:a,myInfoAvatarProps:o,loading:r,viewOnly:i,textInputProps:n,saveBtnProps:c,cancelBtnProps:d,loadMore:s,avatarProps:u,message:p})=>{const f=l.useTheme()||H,[m,b]=t.useState(!1),[h,y]=t.useState(e||[]),x=async e=>{let t;t="post"===e?await c.callback():await s.callback(),y((e=>[...e,...t]))};return g.default.createElement(oa,{commentWrapperStyle:a?.commentWrapperStyle,theme:f},h.map(((e,t)=>{const{name:l,date:o,comment:r,image:i}=e;return g.default.createElement(ra,{key:t,commentBodyStyle:a?.commentBodyStyle,theme:f},g.default.createElement(ia,{commentHeadStyle:a?.commentHeadStyle},g.default.createElement(ze,E({user:{fullName:l,userName:l,url:i},toggleName:!0,size:"LG",customStylesName:{color:f.additional["text-color"]}},u)),g.default.createElement(na,{dateTimeStyle:a?.dateTimeStyle,theme:f},o)),g.default.createElement(ca,{commentDivStyle:a?.commentDivStyle},r))})),!r&&0===h.length&&p,r&&g.default.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"24px"}},g.default.createElement(se,{size:25})),!r&&s.showLoadMore&&g.default.createElement("div",{className:"load-more"},g.default.createElement(fe,{onClick:()=>x("load")},"Load more")),!i&&g.default.createElement(da,{theme:f,inputWrapperStyle:a?.inputWrapperStyle},g.default.createElement(ze,E({toggleName:!1,customStylesImage:{height:"36px",width:"36px"},customStylesContainer:{marginTop:"7px"}},o)),g.default.createElement(ua,null,g.default.createElement(Gl,E({onChange:e=>{n.setInputValue(e.target.value)},isValid:!0,onFocus:e=>b(!0)},n)),m&&g.default.createElement(sa,null,g.default.createElement(ge,E({onClick:e=>{x("post"),n.setInputValue(e.target.value)}},c),c.text),g.default.createElement(fe,E({disabled:!(!d?.isLoading&&!c?.isLoading),onClick:()=>{b(!1),n.setInputValue(""),n.setValidValue({isValid:!0,errMsg:""})},btnStyle:{color:f.variant["neutral-1"]}},d),d.text)))))};pa.propTypes={commentsArray:b.default.array,customStyles:b.default.object,myInfoAvatarProps:b.default.object,viewOnly:b.default.bool,textInputProps:b.default.object,saveBtnProps:b.default.object,cancelBtnProps:b.default.object,loadMore:b.default.object,avatarProps:b.default.object,message:b.default.element},pa.defaultProps={commentsArray:[],customStyles:{commentBodyStyle:{},commentWrapperStyle:{},commentHeadStyle:{},dateTimeStyle:{},commentDivStyle:{},inputWrapperStyle:{}},myInfoAvatarProps:{},loading:!1,viewOnly:!1,textInputProps:{},saveBtnProps:{size:"sm",text:"Save"},cancelBtnProps:{size:"sm",text:"Cancel"},loadMore:{showLoadMore:!1,callback:()=>{}},avatarProps:{},message:g.default.createElement("span",{style:{textAlign:"center",display:"block",marginBottom:"16px"}},"No comments yet")};const fa=h.default.div`
|
|
1971
1971
|
//Set the styles from the default styles object
|
|
1972
1972
|
${({theme:e,type:t})=>R(e,t)}
|
|
1973
1973
|
@media (max-width: 980px) {
|