groundfloor-react-ui 1.3.72 → 1.3.73
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 +6 -6
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1257,7 +1257,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
1259
1259
|
// custom styles
|
|
1260
|
-
${({wrapperStyle:e})=>e}
|
|
1260
|
+
${({wrapperStyle:e})=>e}
|
|
1261
1261
|
`,Rt=m.div``,Zt=m.button`
|
|
1262
1262
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1263
1263
|
background-color: ${({theme:e,disabled:t})=>t?e.variant["neutral-5"]:e.additional.white};
|
|
@@ -1266,7 +1266,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1266
1266
|
border: none;
|
|
1267
1267
|
border-radius: 4px;
|
|
1268
1268
|
width: 100%;
|
|
1269
|
-
color: ${({theme:e,value:t})=>""
|
|
1269
|
+
color: ${({theme:e,value:t})=>""===t?"#9c9c9c":e.additional.black};
|
|
1270
1270
|
display: flex;
|
|
1271
1271
|
justify-content: space-between;
|
|
1272
1272
|
align-items: center;
|
|
@@ -1277,7 +1277,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1277
1277
|
}
|
|
1278
1278
|
|
|
1279
1279
|
// custom styles
|
|
1280
|
-
${({timeBtnStyle:e})=>e}
|
|
1280
|
+
${({timeBtnStyle:e})=>e}
|
|
1281
1281
|
`,Ft=m.div`
|
|
1282
1282
|
display: flex;
|
|
1283
1283
|
align-items: center;
|
|
@@ -1285,14 +1285,14 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1285
1285
|
padding: 8px;
|
|
1286
1286
|
color: ${({theme:e})=>e.additional.white};
|
|
1287
1287
|
// custom styles
|
|
1288
|
-
${({customHeaderStyle:e})=>e}
|
|
1288
|
+
${({customHeaderStyle:e})=>e}
|
|
1289
1289
|
`,Tt=m.span`
|
|
1290
1290
|
margin-top: -1px;
|
|
1291
1291
|
margin-left: 7px;
|
|
1292
1292
|
float: right;
|
|
1293
1293
|
|
|
1294
1294
|
// custom styles
|
|
1295
|
-
${({customIconContainerStyle:e})=>e}
|
|
1295
|
+
${({customIconContainerStyle:e})=>e}
|
|
1296
1296
|
`,jt=u`
|
|
1297
1297
|
display: flex;
|
|
1298
1298
|
gap: 7px;
|
|
@@ -1305,7 +1305,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1305
1305
|
margin-top: 5px;
|
|
1306
1306
|
font-size: 10px;
|
|
1307
1307
|
}
|
|
1308
|
-
`,Dt=({defaultValue:e,onChange:l,inputType:i,onClick:a,placeHolder:r,value:n,disabled:s,startYear:d,endYearRange:p,iconProps:m,customHeaderStyle:u,timeBtnStyle:f,wrapperStyle:g,customIconContainerStyle:h,label:C,labelInline:y,labelStyle:w,required:A,errMsg:S,errMsgColor:k,isValid:V,...E})=>{const[M,H]=o(e);c((()=>{H(e)}),[e]);let B=M?new Date(M):null;for(var z=[],I=p||10,P=d||(new Date).getFullYear();P<=(new Date).getFullYear()+I;P++)z.push(P);let W={};switch(i){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="
|
|
1308
|
+
`,Dt=({defaultValue:e,onChange:l,inputType:i,onClick:a,placeHolder:r,value:n,disabled:s,startYear:d,endYearRange:p,iconProps:m,customHeaderStyle:u,timeBtnStyle:f,wrapperStyle:g,customIconContainerStyle:h,label:C,labelInline:y,labelStyle:w,required:A,errMsg:S,errMsgColor:k,isValid:V,...E})=>{const[M,H]=o(e);c((()=>{H(e)}),[e]);let B=null;M&&(B=M?"string"==typeof M&&"time"===i?new Date("20 Jan, 2022 "+M):new Date(M):null);for(var z=[],I=p||10,P=d||(new Date).getFullYear();P<=(new Date).getFullYear()+I;P++)z.push(P);let W={};switch(i){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 Z=b()||R,F={icon:"calender",color:Z.variant["primary-1"],size:"16",...m};return t.createElement(qt,L({labelInline:y,errMsgColor:k,theme:Z},E),t.createElement("div",{style:{display:"flex"}},t.createElement(lt,L({customStyles:w,type:"label-text",labelInline:y,errMsg:S,text:C,style:{display:"flex",marginBottom:""+(y?"":"7px"),paddingBottom:"0px"}},E)),A&&t.createElement("div",{style:{marginLeft:"4px",color:`${Z.variant.error}`}},"*")),t.createElement(Wt,L({theme:Z},E,{wrapperStyle:g,isValid:V,disabled:s}),t.createElement(v,L({selected:B||new Date,disabled:s,customInput:t.createElement(Rt,{value:n,onClick:a,placeholder:r,theme:Z},t.createElement(Zt,L({theme:Z,value:n,onClick:a,timeBtnStyle:f,disabled:s},E),t.createElement("div",null,n||(r||"-- : -- --")),t.createElement(Tt,L({theme:Z},E,{customIconContainerStyle:h,className:"input-icon"}),F.icon?t.createElement(_,F):null))),onChange:e=>{H(e);var t=null;t="datetime-local"===i?x(e).format("DD MMM YYYY, hh:mm A"):"date"===i?x(e).format("DD MMM, YYYY"):"year"===i?x(e).format("YYYY"):"month"===i?x(e).format("MMMM YYYY"):"time"===i?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:o,increaseMonth:c})=>{let a=x(e).format("MMMM");return t.createElement(Ft,L({theme:Z},E,{inputType:i,customHeaderStyle:u}),"year"!==i?t.createElement("span",{style:{paddingLeft:"10px"},onClick:o},t.createElement(_,{icon:"chevron-left",color:"white",size:16})):null,t.createElement("b",null,"year"!==i?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)},z.map((e=>t.createElement("option",{key:e,value:e},e)))))),"year"!==i?t.createElement("span",{style:{paddingRight:"10px"},onClick:c},t.createElement(_,{icon:"chevron-right",color:"white",size:16})):null)}},E))),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`
|
|
1309
1309
|
cursor: ${({isDisabled:e})=>e?"not-allowed":"initial"} !important;
|
|
1310
1310
|
|
|
1311
1311
|
.text-main-alt {
|
package/dist/index.js
CHANGED
|
@@ -1257,7 +1257,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
1259
1259
|
// custom styles
|
|
1260
|
-
${({wrapperStyle:e})=>e}
|
|
1260
|
+
${({wrapperStyle:e})=>e}
|
|
1261
1261
|
`,zt=h.default.div``,It=h.default.button`
|
|
1262
1262
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1263
1263
|
background-color: ${({theme:e,disabled:t})=>t?e.variant["neutral-5"]:e.additional.white};
|
|
@@ -1266,7 +1266,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1266
1266
|
border: none;
|
|
1267
1267
|
border-radius: 4px;
|
|
1268
1268
|
width: 100%;
|
|
1269
|
-
color: ${({theme:e,value:t})=>""
|
|
1269
|
+
color: ${({theme:e,value:t})=>""===t?"#9c9c9c":e.additional.black};
|
|
1270
1270
|
display: flex;
|
|
1271
1271
|
justify-content: space-between;
|
|
1272
1272
|
align-items: center;
|
|
@@ -1277,7 +1277,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1277
1277
|
}
|
|
1278
1278
|
|
|
1279
1279
|
// custom styles
|
|
1280
|
-
${({timeBtnStyle:e})=>e}
|
|
1280
|
+
${({timeBtnStyle:e})=>e}
|
|
1281
1281
|
`,Pt=h.default.div`
|
|
1282
1282
|
display: flex;
|
|
1283
1283
|
align-items: center;
|
|
@@ -1285,14 +1285,14 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1285
1285
|
padding: 8px;
|
|
1286
1286
|
color: ${({theme:e})=>e.additional.white};
|
|
1287
1287
|
// custom styles
|
|
1288
|
-
${({customHeaderStyle:e})=>e}
|
|
1288
|
+
${({customHeaderStyle:e})=>e}
|
|
1289
1289
|
`,Wt=h.default.span`
|
|
1290
1290
|
margin-top: -1px;
|
|
1291
1291
|
margin-left: 7px;
|
|
1292
1292
|
float: right;
|
|
1293
1293
|
|
|
1294
1294
|
// custom styles
|
|
1295
|
-
${({customIconContainerStyle:e})=>e}
|
|
1295
|
+
${({customIconContainerStyle:e})=>e}
|
|
1296
1296
|
`,Rt=l.css`
|
|
1297
1297
|
display: flex;
|
|
1298
1298
|
gap: 7px;
|
|
@@ -1305,7 +1305,7 @@ cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
|
1305
1305
|
margin-top: 5px;
|
|
1306
1306
|
font-size: 10px;
|
|
1307
1307
|
}
|
|
1308
|
-
`,Zt=({defaultValue:e,onChange:a,inputType:o,onClick:i,placeHolder:r,value:c,disabled:n,startYear:d,endYearRange:s,iconProps:p,customHeaderStyle:u,timeBtnStyle:f,wrapperStyle:m,customIconContainerStyle:b,label:h,labelInline:C,labelStyle:v,required:w,errMsg:A,errMsgColor:S,isValid:k,...E})=>{const[M,L]=t.useState(e);t.useEffect((()=>{L(e)}),[e]);let H=M?new Date(M):null;for(var B=[],z=s||10,P=d||(new Date).getFullYear();P<=(new Date).getFullYear()+z;P++)B.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="
|
|
1308
|
+
`,Zt=({defaultValue:e,onChange:a,inputType:o,onClick:i,placeHolder:r,value:c,disabled:n,startYear:d,endYearRange:s,iconProps:p,customHeaderStyle:u,timeBtnStyle:f,wrapperStyle:m,customIconContainerStyle:b,label:h,labelInline:C,labelStyle:v,required:w,errMsg:A,errMsgColor:S,isValid:k,...E})=>{const[M,L]=t.useState(e);t.useEffect((()=>{L(e)}),[e]);let H=null;M&&(H=M?"string"==typeof M&&"time"===o?new Date("20 Jan, 2022 "+M):new Date(M):null);for(var B=[],z=s||10,P=d||(new Date).getFullYear();P<=(new Date).getFullYear()+z;P++)B.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,V({labelInline:C,errMsgColor:S,theme:R},E),g.default.createElement("div",{style:{display:"flex"}},g.default.createElement($e,V({customStyles:v,type:"label-text",labelInline:C,errMsg:A,text:h,style:{display:"flex",marginBottom:""+(C?"":"7px"),paddingBottom:"0px"}},E)),w&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${R.variant.error}`}},"*")),g.default.createElement(Bt,V({theme:R},E,{wrapperStyle:m,isValid:k,disabled:n}),g.default.createElement(y.default,V({selected:H||new Date,disabled:n,customInput:g.default.createElement(zt,{value:c,onClick:i,placeholder:r,theme:R},g.default.createElement(It,V({theme:R,value:c,onClick:i,timeBtnStyle:f,disabled:n},E),g.default.createElement("div",null,c||(r||"-- : -- --")),g.default.createElement(Wt,V({theme:R},E,{customIconContainerStyle:b,className:"input-icon"}),T.icon?g.default.createElement(Q,T):null))),onChange:e=>{L(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:r},W,{renderCustomHeader:({date:e,changeYear:t,decreaseMonth:l,increaseMonth:a})=>{let i=x.default(e).format("MMMM");return g.default.createElement(Pt,V({theme:R},E,{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"}},i):null," ",g.default.createElement("span",{className:"calender-year"},g.default.createElement("select",{value:e.getFullYear(),onChange:({target:{value:e}})=>t(e)},B.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)}},E))),A.length>0&&g.default.createElement("div",{className:"err-text"},A))};Zt.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},Zt.defaultProps={disabled:!1,startYear:new Date,endYearRange:10,value:"",defaultValue:"",onChange:()=>{},label:"",required:!1,labelInline:!1,errMsg:"",isValid:!0};const Ft=h.default.div`
|
|
1309
1309
|
cursor: ${({isDisabled:e})=>e?"not-allowed":"initial"} !important;
|
|
1310
1310
|
|
|
1311
1311
|
.text-main-alt {
|