groundfloor-react-ui 1.3.50 → 1.3.52
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
|
`,nt=m.span`
|
|
784
784
|
color: ${({theme:e})=>e.variant.error};
|
|
785
785
|
${({errorTextStyle:e})=>e};
|
|
786
|
-
`,st=({listChips:e,setListChips:l,currentChip:o,setCurrentChip:
|
|
786
|
+
`,st=({listChips:e,setListChips:l,currentChip:o,setCurrentChip:a,chipListString:r,placeholder:n,errorMsg:s,handleBlurProps:d,label:p,labelCusTomStyles:m,containerStyle:u,inputContainerStyle:f,errorTextStyle:g,disabled:h,isValid:y,handleInputKeyDownProps:C,handleInputChangeProps:x,...v})=>{const[w,A]=c(r?r.split(","):e||[]),[S,k]=c(o),[E,V]=c(""),M=b()||R;i((()=>{A(r?r.split(","):e||[])}),[r,e]),i((()=>{k(o)}),[o]);return t.createElement(ot,{theme:M,containerStyle:u},t.createElement(ct,{inputContainerStyle:f},t.createElement(lt,{text:p,customStyles:m}),w.map(((e,l)=>t.createElement(it,{theme:M,key:e+`${l}`,onClick:()=>(e=>{const t=[...w];t.splice(e,1),A(t),V(""),d(t.join(","))})(l)},t.createElement(at,null,e)))),t.createElement(rt,{type:"text",placeholder:n,value:S,onKeyDown:e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),y?S.trim()&&(C([...w,S.trim()].join(",")),A([...w,S.trim()]),k(""),V("")):V(s)):"Backspace"!==e.key||S||(C(w.slice(0,-1).join(",")),A(w.slice(0,-1)))},onChange:e=>{k(e.target.value),V(""),x(e.target.value)},theme:M,onBlur:()=>{if(y){let e;e=S.trim()?[...w,S.trim()]:[...w],d(e.join(",")),A(e),k("")}else y||V(s)},disabled:h})),E&&t.createElement(nt,{errorTextStyle:g,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,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
|
|
@@ -1299,7 +1299,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1299
1299
|
margin-top: 5px;
|
|
1300
1300
|
font-size: 10px;
|
|
1301
1301
|
}
|
|
1302
|
-
`,Dt=({defaultValue:e,onChange:l,inputType:o,onClick:
|
|
1302
|
+
`,Dt=({defaultValue:e,onChange:l,inputType:o,onClick:a,placeHolder:r,value:n,disabled:s,startYear:d,endYearRange:p,iconProps:m,customHeaderStyle:u,timeBtnStyle:f,wrapperStyle:g,customIconContainerStyle:h,label:y,labelInline:C,labelStyle:w,required:A,errMsg:S,errMsgColor:k,isValid:E,...V})=>{const[M,B]=c(e);i((()=>{B(e)}),[e]);let L=M?new Date(M):null;for(var H=[],I=p||10,P=d||(new Date).getFullYear();P<=(new Date).getFullYear()+I;P++)H.push(P);let W={};switch(o){case"date":default:W.dateFormat="dd MMM, yyyy";break;case"month":W.dateFormat="MMMM yyyy",W.showMonthYearPicker=!0;break;case"year":W.dateFormat="yyyy",W.showYearPicker=!0;break;case"datetime-local":W.dateFormat="dd MMM yyyy, hh:mm a",W.showTimeSelect=!0,W.timeFormat="hh:mm a",W.timeIntervals=15,W.timeCaption="Time";break;case"time":W.showTimeSelect=!0,W.showTimeSelectOnly=!0,W.dateFormat="hh:mm a"}const F=b()||R,Z={icon:"calender",color:F.variant["primary-1"],size:"16",...m};return t.createElement(qt,z({labelInline:C,errMsgColor:k,theme:F},V),t.createElement("div",{style:{display:"flex"}},t.createElement(lt,z({customStyles:w,type:"label-text",labelInline:C,errMsg:S,text:y,style:{display:"flex",marginBottom:""+(C?"":"7px"),paddingBottom:"0px"}},V)),A&&t.createElement("div",{style:{marginLeft:"4px",color:`${F.variant.error}`}},"*")),t.createElement(Wt,z({theme:F},V,{wrapperStyle:g,isValid:E,disabled:s}),t.createElement(v,z({selected:L,disabled:s,customInput:t.createElement(Rt,{value:n,onClick:a,placeholder:r,theme:F},t.createElement(Ft,z({theme:F,value:n,onClick:a,timeBtnStyle:f,disabled:s},V),t.createElement("div",null,n||(r||"-- : -- --")),t.createElement(Tt,z({theme:F},V,{customIconContainerStyle:h,className:"input-icon"}),Z.icon?t.createElement(_,Z):null))),onChange:e=>{B(e);var t=null;t="datetime-local"==o?x(e).format("DD MMM YYYY, hh:mm A"):"date"==o?x(e).format("DD MMM, YYYY"):"year"==o?x(e).format("YYYY"):"month"==o?x(e).format("MMMM YYYY"):"time"==o?x(e).format("hh:mm A"):x(e).format("DD MMM, YYYY"),l(t)},showYearDropdown:!0,yearDropdownItemNumber:5,dropdownMode:"select",placeholderText:r},W,{renderCustomHeader:({date:e,changeYear:l,decreaseMonth:c,increaseMonth:i})=>{let a=x(e).format("MMMM");return t.createElement(Zt,z({theme:F},V,{inputType:o,customHeaderStyle:u}),"year"!==o?t.createElement("span",{style:{paddingLeft:"10px"},onClick:c},t.createElement(_,{icon:"chevron-left",color:"white",size:16})):null,t.createElement("b",null,"year"!==o?t.createElement("span",{style:{paddingRight:"5px"}},a):null," ",t.createElement("span",{className:"calender-year"},t.createElement("select",{value:e.getFullYear(),onChange:({target:{value:e}})=>l(e)},H.map((e=>t.createElement("option",{key:e,value:e},e)))))),"year"!==o?t.createElement("span",{style:{paddingRight:"10px"},onClick:i},t.createElement(_,{icon:"chevron-right",color:"white",size:16})):null)}},V))),S.length>0&&t.createElement("div",{className:"err-text"},S))};Dt.propTypes={defaultValue:e.string,onChange:e.func,inputType:e.string,onClick:e.func,placeHolder:e.string,value:e.string,disabled:e.bool,startYear:e.number,endYearRange:e.number,iconProps:e.object,customHeaderStyle:e.object,timeBtnStyle:e.object,wrapperStyle:e.object,customIconContainerStyle:e.object,label:e.string,labelStyle:e.object,labelInline:e.bool,errMsg:e.string,errMsgColor:e.string,isValid:e.bool},Dt.defaultProps={disabled:!1,startYear:new Date,endYearRange:10,value:"",defaultValue:"",onChange:()=>{},label:"",required:!1,labelInline:!1,errMsg:"",isValid:!0};const Ot=m.div`
|
|
1303
1303
|
cursor: ${({isDisabled:e})=>e?"not-allowed":"initial"} !important;
|
|
1304
1304
|
|
|
1305
1305
|
.text-main-alt {
|
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:c,placeholder:i,errorMsg:n,handleBlurProps:d,label:s,labelCusTomStyles:p,containerStyle:u,inputContainerStyle:f,errorTextStyle:m,disabled:b,isValid:h,handleInputKeyDownProps:y,handleInputChangeProps:x,...C})=>{
|
|
786
|
+
`,rt=({listChips:e,setListChips:a,currentChip:o,setCurrentChip:r,chipListString:c,placeholder:i,errorMsg:n,handleBlurProps:d,label:s,labelCusTomStyles:p,containerStyle:u,inputContainerStyle:f,errorTextStyle:m,disabled:b,isValid:h,handleInputKeyDownProps:y,handleInputChangeProps:x,...C})=>{const[v,w]=t.useState(c?c.split(","):e||[]),[A,S]=t.useState(o),[k,E]=t.useState(""),V=l.useTheme()||I;t.useEffect((()=>{w(c?c.split(","):e||[])}),[c,e]),t.useEffect((()=>{S(o)}),[o]);return g.default.createElement(_e,{theme:V,containerStyle:u},g.default.createElement(et,{inputContainerStyle:f},g.default.createElement($e,{text:s,customStyles:p}),v.map(((e,t)=>g.default.createElement(tt,{theme:V,key:e+`${t}`,onClick:()=>(e=>{const t=[...v];t.splice(e,1),w(t),E(""),d(t.join(","))})(t)},g.default.createElement(lt,null,e)))),g.default.createElement(at,{type:"text",placeholder:i,value:A,onKeyDown:e=>{"Enter"===e.key||","===e.key?(e.preventDefault(),h?A.trim()&&(y([...v,A.trim()].join(",")),w([...v,A.trim()]),S(""),E("")):E(n)):"Backspace"!==e.key||A||(y(v.slice(0,-1).join(",")),w(v.slice(0,-1)))},onChange:e=>{S(e.target.value),E(""),x(e.target.value)},theme:V,onBlur:()=>{if(h){let e;e=A.trim()?[...v,A.trim()]:[...v],d(e.join(",")),w(e),S("")}else h||E(n)},disabled:b})),k&&g.default.createElement(ot,{errorTextStyle:m,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,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 ct=h.default.div`
|
|
787
787
|
box-sizing: initial;
|
|
788
788
|
|
|
789
789
|
//Set the styles from the default styles object
|
|
@@ -1299,7 +1299,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1299
1299
|
margin-top: 5px;
|
|
1300
1300
|
font-size: 10px;
|
|
1301
1301
|
}
|
|
1302
|
-
`,Ft=({defaultValue:e,onChange:a,inputType:o,onClick:r,placeHolder:c,value:i,disabled:n,startYear:d,endYearRange:s,iconProps:p,customHeaderStyle:u,timeBtnStyle:f,wrapperStyle:m,customIconContainerStyle:b,label:h,labelInline:y,labelStyle:v,required:w,errMsg:A,errMsgColor:S,isValid:k,...V})=>{const[M,B]=t.useState(e);let z=M?new Date(M):null;for(var L=[],H=s||10,P=d||(new Date).getFullYear();P<=(new Date).getFullYear()+H;P++)L.push(P);let W={};switch(o){case"date":default:W.dateFormat="dd MMM, yyyy";break;case"month":W.dateFormat="MMMM yyyy",W.showMonthYearPicker=!0;break;case"year":W.dateFormat="yyyy",W.showYearPicker=!0;break;case"datetime-local":W.dateFormat="dd MMM yyyy, hh:mm a",W.showTimeSelect=!0,W.timeFormat="hh:mm a",W.timeIntervals=15,W.timeCaption="Time";break;case"time":W.showTimeSelect=!0,W.showTimeSelectOnly=!0,W.dateFormat="hh:mm a"}const R=l.useTheme()||I,T={icon:"calender",color:R.variant["primary-1"],size:"16",...p};return g.default.createElement(Tt,E({labelInline:y,errMsgColor:S,theme:R},V),g.default.createElement("div",{style:{display:"flex"}},g.default.createElement($e,E({customStyles:v,type:"label-text",labelInline:y,errMsg:A,text:h,style:{display:"flex",marginBottom:""+(y?"":"7px"),paddingBottom:"0px"}},V)),w&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${R.variant.error}`}},"*")),g.default.createElement(Lt,E({theme:R},V,{wrapperStyle:m,isValid:k,disabled:n}),g.default.createElement(C.default,E({selected:z,disabled:n,customInput:g.default.createElement(Ht,{value:i,onClick:r,placeholder:c,theme:R},g.default.createElement(It,E({theme:R,value:i,onClick:r,timeBtnStyle:f,disabled:n},V),g.default.createElement("div",null,i||(c||"-- : -- --")),g.default.createElement(Wt,E({theme:R},V,{customIconContainerStyle:b,className:"input-icon"}),T.icon?g.default.createElement(Q,T):null))),onChange:e=>{B(e);var t=null;t="datetime-local"==o?x.default(e).format("DD MMM YYYY, hh:mm A"):"date"==o?x.default(e).format("DD MMM, YYYY"):"year"==o?x.default(e).format("YYYY"):"month"==o?x.default(e).format("MMMM YYYY"):"time"==o?x.default(e).format("hh:mm A"):x.default(e).format("DD MMM, YYYY"),a(t)},showYearDropdown:!0,yearDropdownItemNumber:5,dropdownMode:"select",placeholderText:c},W,{renderCustomHeader:({date:e,changeYear:t,decreaseMonth:l,increaseMonth:a})=>{let r=x.default(e).format("MMMM");return g.default.createElement(Pt,E({theme:R},V,{inputType:o,customHeaderStyle:u}),"year"!==o?g.default.createElement("span",{style:{paddingLeft:"10px"},onClick:l},g.default.createElement(Q,{icon:"chevron-left",color:"white",size:16})):null,g.default.createElement("b",null,"year"!==o?g.default.createElement("span",{style:{paddingRight:"5px"}},r):null," ",g.default.createElement("span",{className:"calender-year"},g.default.createElement("select",{value:e.getFullYear(),onChange:({target:{value:e}})=>t(e)},L.map((e=>g.default.createElement("option",{key:e,value:e},e)))))),"year"!==o?g.default.createElement("span",{style:{paddingRight:"10px"},onClick:a},g.default.createElement(Q,{icon:"chevron-right",color:"white",size:16})):null)}},V))),A.length>0&&g.default.createElement("div",{className:"err-text"},A))};Ft.propTypes={defaultValue:b.default.string,onChange:b.default.func,inputType:b.default.string,onClick:b.default.func,placeHolder:b.default.string,value:b.default.string,disabled:b.default.bool,startYear:b.default.number,endYearRange:b.default.number,iconProps:b.default.object,customHeaderStyle:b.default.object,timeBtnStyle:b.default.object,wrapperStyle:b.default.object,customIconContainerStyle:b.default.object,label:b.default.string,labelStyle:b.default.object,labelInline:b.default.bool,errMsg:b.default.string,errMsgColor:b.default.string,isValid:b.default.bool},Ft.defaultProps={disabled:!1,startYear:new Date,endYearRange:10,value:"",defaultValue:"",onChange:()=>{},label:"",required:!1,labelInline:!1,errMsg:"",isValid:!0};const Zt=h.default.div`
|
|
1302
|
+
`,Ft=({defaultValue:e,onChange:a,inputType:o,onClick:r,placeHolder:c,value:i,disabled:n,startYear:d,endYearRange:s,iconProps:p,customHeaderStyle:u,timeBtnStyle:f,wrapperStyle:m,customIconContainerStyle:b,label:h,labelInline:y,labelStyle:v,required:w,errMsg:A,errMsgColor:S,isValid:k,...V})=>{const[M,B]=t.useState(e);t.useEffect((()=>{B(e)}),[e]);let z=M?new Date(M):null;for(var L=[],H=s||10,P=d||(new Date).getFullYear();P<=(new Date).getFullYear()+H;P++)L.push(P);let W={};switch(o){case"date":default:W.dateFormat="dd MMM, yyyy";break;case"month":W.dateFormat="MMMM yyyy",W.showMonthYearPicker=!0;break;case"year":W.dateFormat="yyyy",W.showYearPicker=!0;break;case"datetime-local":W.dateFormat="dd MMM yyyy, hh:mm a",W.showTimeSelect=!0,W.timeFormat="hh:mm a",W.timeIntervals=15,W.timeCaption="Time";break;case"time":W.showTimeSelect=!0,W.showTimeSelectOnly=!0,W.dateFormat="hh:mm a"}const R=l.useTheme()||I,T={icon:"calender",color:R.variant["primary-1"],size:"16",...p};return g.default.createElement(Tt,E({labelInline:y,errMsgColor:S,theme:R},V),g.default.createElement("div",{style:{display:"flex"}},g.default.createElement($e,E({customStyles:v,type:"label-text",labelInline:y,errMsg:A,text:h,style:{display:"flex",marginBottom:""+(y?"":"7px"),paddingBottom:"0px"}},V)),w&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${R.variant.error}`}},"*")),g.default.createElement(Lt,E({theme:R},V,{wrapperStyle:m,isValid:k,disabled:n}),g.default.createElement(C.default,E({selected:z,disabled:n,customInput:g.default.createElement(Ht,{value:i,onClick:r,placeholder:c,theme:R},g.default.createElement(It,E({theme:R,value:i,onClick:r,timeBtnStyle:f,disabled:n},V),g.default.createElement("div",null,i||(c||"-- : -- --")),g.default.createElement(Wt,E({theme:R},V,{customIconContainerStyle:b,className:"input-icon"}),T.icon?g.default.createElement(Q,T):null))),onChange:e=>{B(e);var t=null;t="datetime-local"==o?x.default(e).format("DD MMM YYYY, hh:mm A"):"date"==o?x.default(e).format("DD MMM, YYYY"):"year"==o?x.default(e).format("YYYY"):"month"==o?x.default(e).format("MMMM YYYY"):"time"==o?x.default(e).format("hh:mm A"):x.default(e).format("DD MMM, YYYY"),a(t)},showYearDropdown:!0,yearDropdownItemNumber:5,dropdownMode:"select",placeholderText:c},W,{renderCustomHeader:({date:e,changeYear:t,decreaseMonth:l,increaseMonth:a})=>{let r=x.default(e).format("MMMM");return g.default.createElement(Pt,E({theme:R},V,{inputType:o,customHeaderStyle:u}),"year"!==o?g.default.createElement("span",{style:{paddingLeft:"10px"},onClick:l},g.default.createElement(Q,{icon:"chevron-left",color:"white",size:16})):null,g.default.createElement("b",null,"year"!==o?g.default.createElement("span",{style:{paddingRight:"5px"}},r):null," ",g.default.createElement("span",{className:"calender-year"},g.default.createElement("select",{value:e.getFullYear(),onChange:({target:{value:e}})=>t(e)},L.map((e=>g.default.createElement("option",{key:e,value:e},e)))))),"year"!==o?g.default.createElement("span",{style:{paddingRight:"10px"},onClick:a},g.default.createElement(Q,{icon:"chevron-right",color:"white",size:16})):null)}},V))),A.length>0&&g.default.createElement("div",{className:"err-text"},A))};Ft.propTypes={defaultValue:b.default.string,onChange:b.default.func,inputType:b.default.string,onClick:b.default.func,placeHolder:b.default.string,value:b.default.string,disabled:b.default.bool,startYear:b.default.number,endYearRange:b.default.number,iconProps:b.default.object,customHeaderStyle:b.default.object,timeBtnStyle:b.default.object,wrapperStyle:b.default.object,customIconContainerStyle:b.default.object,label:b.default.string,labelStyle:b.default.object,labelInline:b.default.bool,errMsg:b.default.string,errMsgColor:b.default.string,isValid:b.default.bool},Ft.defaultProps={disabled:!1,startYear:new Date,endYearRange:10,value:"",defaultValue:"",onChange:()=>{},label:"",required:!1,labelInline:!1,errMsg:"",isValid:!0};const Zt=h.default.div`
|
|
1303
1303
|
cursor: ${({isDisabled:e})=>e?"not-allowed":"initial"} !important;
|
|
1304
1304
|
|
|
1305
1305
|
.text-main-alt {
|