groundfloor-react-ui 1.2.73 → 1.2.75
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 +109 -212
- package/dist/index.js +31 -134
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -261,7 +261,7 @@ ${({inBuiltCss:e,type:t,customStyles:l})=>{if(e){let a={};if(e[t]){for(const t i
|
|
|
261
261
|
color:${({theme:e})=>e.textColor};
|
|
262
262
|
|
|
263
263
|
${({inBuiltCss:e,type:t,size:l,customStyles:a})=>{if(e){let o={};if(e[t]){for(const t in e.common)o[t]=e.common[t];for(const l in e[t])delete e.common[l],o[l]=e[t][l];for(const a in e[`${t}${l}`])o[a]=e[`${t}${l}`][a],delete e.common[a]}return{...o,...a}}}}
|
|
264
|
-
`,pe=({customStylesContainer:e,customStylesImage:t,customStylesCircle:a,customStylesName:o,size:r,toggleName:i,user:n,...c})=>{const s=l.useTheme()||R;return g.default.createElement(se,k({inBuiltCss:W,theme:s,customStyles:e,type:"avatarContainer"},c),n?.url&&g.default.createElement(ce,k({},c,{customStyles:t,type:"imageAvatar",size:r,alt:"user-picture",src:n.url})),g.default.createElement(de,k({},c,{theme:s,inBuiltCss:W,type:"avatarCircle",customStyles:a,size:r}),n?.userName&&n?.userName.split(" ").length>=2?n?.userName.split(" ")[0].charAt(0).toUpperCase()+n?.userName.split(" ")[1].charAt(0).toUpperCase():n?.userName&&1===n?.userName.split(" ").length&&n?.userName.split(" ")[0].charAt(0).toUpperCase()),i&&g.default.createElement(ue,k({inBuiltCss:W},c,{theme:s,type:"avatarName",customStyles:o,size:r}),n.userName," "))};pe.propTypes={customStylesCircle:b.default.object,customStylesName:b.default.object,customStylesContainer:b.default.object,customStylesImage:b.default.object,toggleName:b.default.bool,size:b.default.oneOf(["SM","MD","LG"]),user:b.default.object},pe.defaultProps={block:!1,size:"MD",toggleName:!1,user:null,customStylesContainer:null,customStylesImage:null,customStylesCircle:null,customStylesName:null};const fe=h.default.span`
|
|
264
|
+
`,pe=({customStylesContainer:e,customStylesImage:t,customStylesCircle:a,customStylesName:o,size:r,toggleName:i,user:n,...c})=>{const s=l.useTheme()||R;return g.default.createElement(se,k({inBuiltCss:W,theme:s,customStyles:e,type:"avatarContainer"},c),n?.url&&g.default.createElement(ce,k({},c,{customStyles:t,type:"imageAvatar",size:r,alt:"user-picture",src:n.url})),g.default.createElement(de,k({},c,{theme:s,inBuiltCss:W,type:"avatarCircle",customStyles:a,size:r,style:{visibility:n?.url?"hidden":"visible"}}),n?.userName&&n?.userName.split(" ").length>=2?n?.userName.split(" ")[0].charAt(0).toUpperCase()+n?.userName.split(" ")[1].charAt(0).toUpperCase():n?.userName&&1===n?.userName.split(" ").length&&n?.userName.split(" ")[0].charAt(0).toUpperCase()),i&&g.default.createElement(ue,k({inBuiltCss:W},c,{theme:s,type:"avatarName",customStyles:o,size:r}),n.userName," "))};pe.propTypes={customStylesCircle:b.default.object,customStylesName:b.default.object,customStylesContainer:b.default.object,customStylesImage:b.default.object,toggleName:b.default.bool,size:b.default.oneOf(["SM","MD","LG"]),user:b.default.object},pe.defaultProps={block:!1,size:"MD",toggleName:!1,user:null,customStylesContainer:null,customStylesImage:null,customStylesCircle:null,customStylesName:null};const fe=h.default.span`
|
|
265
265
|
${({inBuiltCss:e,type:t,customStyles:l})=>{if(e){let a={};if(e[t]){for(const t in e.common)a[t]=e.common[t];for(const l in e[t])a[l]=e[t][l],delete e.common[l]}return{...a,...l}}}}
|
|
266
266
|
width: auto;
|
|
267
267
|
`,me=h.default.div`
|
|
@@ -1231,7 +1231,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1231
1231
|
outline: none;
|
|
1232
1232
|
|
|
1233
1233
|
.input-icon svg path {
|
|
1234
|
-
fill: ${({theme:e,disabled:t})=>!t&&e.variant["
|
|
1234
|
+
fill: ${({theme:e,disabled:t})=>!t&&e.variant["neutral-3"]};
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
@@ -1274,8 +1274,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1274
1274
|
${({wrapperStyle:e})=>e};
|
|
1275
1275
|
`,Bt=h.default.div``,It=h.default.button`
|
|
1276
1276
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
1277
|
-
background-color: ${({theme:e,disabled:t})=>t?e.variant["
|
|
1278
|
-
;
|
|
1277
|
+
background-color: ${({theme:e,disabled:t})=>t?e.variant["neutral-5"]:e.bgColor};
|
|
1279
1278
|
padding: 5.5px 12px;
|
|
1280
1279
|
padding-right: 7px;
|
|
1281
1280
|
border: none;
|
|
@@ -1308,6 +1307,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1308
1307
|
|
|
1309
1308
|
// custom styles
|
|
1310
1309
|
${({customIconContainerStyle:e})=>e};
|
|
1310
|
+
|
|
1311
1311
|
`,Wt=l.css`
|
|
1312
1312
|
display: flex;
|
|
1313
1313
|
gap: 7px;
|
|
@@ -1320,107 +1320,9 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1320
1320
|
margin-top: 5px;
|
|
1321
1321
|
font-size: 10px;
|
|
1322
1322
|
}
|
|
1323
|
-
`,Pt=({defaultValue:e,onChange:a,inputType:o,onClick:r,placeHolder:i,value:n,disabled:c,startYear:s,endYearRange:d,iconProps:u,customHeaderStyle:p,timeBtnStyle:f,wrapperStyle:m,customIconContainerStyle:b,label:h,labelInline:y,labelStyle:C,required:A,errMsg:w,errMsgColor:S,isValid:E,...V})=>{const[z,M]=t.useState(e);let B=z?new Date(z):null;for(var I=[],L=d||10,W=s||(new Date).getFullYear();W<=(new Date).getFullYear()+L;W++)I.push(W);let T={};switch(o){case"date":default:T.dateFormat="dd MMM, yyyy";break;case"month":T.dateFormat="MMMM yyyy",T.showMonthYearPicker=!0;break;case"year":T.dateFormat="yyyy",T.showYearPicker=!0;break;case"datetime-local":T.dateFormat="dd MMM yyyy, hh:mm a",T.showTimeSelect=!0,T.timeFormat="hh:mm a",T.timeIntervals=15,T.timeCaption="Time";break;case"time":T.showTimeSelect=!0,T.showTimeSelectOnly=!0,T.dateFormat="hh:mm a"}const P=l.useTheme()||R,H={icon:"calender",color:"
|
|
1324
|
-
|
|
1323
|
+
`,Pt=({defaultValue:e,onChange:a,inputType:o,onClick:r,placeHolder:i,value:n,disabled:c,startYear:s,endYearRange:d,iconProps:u,customHeaderStyle:p,timeBtnStyle:f,wrapperStyle:m,customIconContainerStyle:b,label:h,labelInline:y,labelStyle:C,required:A,errMsg:w,errMsgColor:S,isValid:E,...V})=>{const[z,M]=t.useState(e);let B=z?new Date(z):null;for(var I=[],L=d||10,W=s||(new Date).getFullYear();W<=(new Date).getFullYear()+L;W++)I.push(W);let T={};switch(o){case"date":default:T.dateFormat="dd MMM, yyyy";break;case"month":T.dateFormat="MMMM yyyy",T.showMonthYearPicker=!0;break;case"year":T.dateFormat="yyyy",T.showYearPicker=!0;break;case"datetime-local":T.dateFormat="dd MMM yyyy, hh:mm a",T.showTimeSelect=!0,T.timeFormat="hh:mm a",T.timeIntervals=15,T.timeCaption="Time";break;case"time":T.showTimeSelect=!0,T.showTimeSelectOnly=!0,T.dateFormat="hh:mm a"}const P=l.useTheme()||R,H={icon:"calender",color:P.variant["primary-1"],size:"16",...u};return g.default.createElement(Tt,k({labelInline:y,errMsgColor:S,theme:P},V),g.default.createElement("div",{style:{display:"flex"}},g.default.createElement(ot,k({customStyles:C,type:"label-text",labelInline:y,errMsg:w,text:h,style:{display:"flex",marginBottom:""+(y?"":"7px"),paddingBottom:"0px"}},V)),A&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${P.variant.error}`}},"*")),g.default.createElement(Mt,k({theme:P},V,{wrapperStyle:m,isValid:E,disabled:c}),g.default.createElement(v.default,k({selected:B,disabled:c,customInput:g.default.createElement(Bt,{value:n,onClick:r,placeholder:i,theme:P},g.default.createElement(It,k({theme:P,value:n,onClick:r,timeBtnStyle:f,disabled:c},V),g.default.createElement("div",null,n||(i||"-- : -- --")),g.default.createElement(Rt,k({theme:P},V,{customIconContainerStyle:b,className:"input-icon"}),H.icon?g.default.createElement(N,H):null))),onChange:e=>{M(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:i},T,{renderCustomHeader:({date:e,changeYear:t,decreaseMonth:l,increaseMonth:a})=>{let r=x.default(e).format("MMMM");return g.default.createElement(Lt,k({theme:P},V,{inputType:o,customHeaderStyle:p}),"year"!==o?g.default.createElement("span",{style:{paddingLeft:"10px"},onClick:l},g.default.createElement(N,{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)},I.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(N,{icon:"chevron-right",color:"white",size:16})):null)}}))),w.length>0&&g.default.createElement("div",{className:"err-text"},w))};Pt.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},Pt.defaultProps={disabled:!1,startYear:new Date,endYearRange:10,value:"",defaultValue:"",onChange:()=>{},label:"",required:!1,labelInline:!1,errMsg:"",isValid:!0};const Ht=h.default.div`
|
|
1325
1324
|
cursor: ${({isDisabled:e})=>e?"not-allowed":"initial"} !important;
|
|
1326
1325
|
|
|
1327
|
-
.master-dropdown,
|
|
1328
|
-
.new-select {
|
|
1329
|
-
.master-dropdown__menu,
|
|
1330
|
-
.new-select__menu {
|
|
1331
|
-
margin: 0 0 0;
|
|
1332
|
-
padding: 0;
|
|
1333
|
-
border: 0;
|
|
1334
|
-
box-shadow: 0px 8px 40px rgba(56, 66, 100, 0.228174);
|
|
1335
|
-
border-bottom-left-radius: 4.32px;
|
|
1336
|
-
border-bottom-right-radius: 4.32px;
|
|
1337
|
-
border-top-left-radius: 0;
|
|
1338
|
-
border-top-right-radius: 0;
|
|
1339
|
-
width: 100%;
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
.new-select__dropdown-indicator {
|
|
1343
|
-
padding-top: 0px;
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
.master-dropdown__single-value {
|
|
1347
|
-
.input-label {
|
|
1348
|
-
max-width: 250px;
|
|
1349
|
-
overflow: hidden;
|
|
1350
|
-
text-overflow: ellipsis;
|
|
1351
|
-
|
|
1352
|
-
&:hover {
|
|
1353
|
-
max-width: 100%;
|
|
1354
|
-
overflow: visible;
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
.master-dropdown__menu-list,
|
|
1360
|
-
.new-select__menu-list {
|
|
1361
|
-
margin: 0;
|
|
1362
|
-
padding: 0;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
.master-dropdown__menu-list {
|
|
1366
|
-
max-height: 110px;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
.master-dropdown__option,
|
|
1370
|
-
.new-select__option {
|
|
1371
|
-
color: ${({theme:e})=>e.textColor};
|
|
1372
|
-
padding-top: 3px;
|
|
1373
|
-
padding-bottom: 3px;
|
|
1374
|
-
margin: 8px 0;
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
.get-selection__option:first-child {
|
|
1378
|
-
margin-top: -113px;
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
|
-
.master-dropdown__option--is-focused,
|
|
1382
|
-
.master-dropdown__option:hover,
|
|
1383
|
-
.new-select__option--is-focused,
|
|
1384
|
-
.new-select__option:hover {
|
|
1385
|
-
background-color: ${({theme:e})=>e.neutral["neutral-5"]};
|
|
1386
|
-
cursor: pointer;
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
.new-select__control:hover,
|
|
1390
|
-
.new-select__control--is-focused {
|
|
1391
|
-
box-shadow: none;
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
.master-dropdown__option--is-selected,
|
|
1395
|
-
.new-select__option--is-selected {
|
|
1396
|
-
background: transparent;
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
.master-dropdown__value-container,
|
|
1400
|
-
.new-select__value-container {
|
|
1401
|
-
padding: 0.375rem 0.75rem 0.5rem;
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
.default-select {
|
|
1406
|
-
.default-select__control {
|
|
1407
|
-
height: 39px;
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
.default-select__value-container--has-value {
|
|
1411
|
-
padding: 0 8px 4px 8px;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
// .default-select__indicator {
|
|
1415
|
-
// padding: 0 8px 0 8px;
|
|
1416
|
-
// padding-top: 0px;
|
|
1417
|
-
// }
|
|
1418
|
-
|
|
1419
|
-
.default-select__control--is-focused {
|
|
1420
|
-
outline: none;
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
1326
|
.text-main-alt {
|
|
1425
1327
|
color: ${({theme:e})=>e.textColor} !important;
|
|
1426
1328
|
margin-right: 0px;
|
|
@@ -1430,40 +1332,22 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1430
1332
|
white-space: nowrap;
|
|
1431
1333
|
overflow: hidden;
|
|
1432
1334
|
text-overflow: ellipsis;
|
|
1433
|
-
// width: 57%;
|
|
1434
1335
|
max-width: 55%;
|
|
1336
|
+
display: block;
|
|
1435
1337
|
}
|
|
1436
1338
|
.text-more-alt {
|
|
1437
1339
|
font-size: 12px;
|
|
1438
1340
|
color: ${({theme:e})=>e.neutral["neutral-2"]};
|
|
1439
1341
|
padding-right: 0px;
|
|
1440
|
-
|
|
1441
|
-
.css-mohuvp-dummyInput-DummyInput {
|
|
1442
|
-
height: 0px;
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
.css-6j8wv5-Input {
|
|
1446
|
-
margin: 0px;
|
|
1447
|
-
padding-top: 0px;
|
|
1448
|
-
}
|
|
1449
|
-
.new-select__menu {
|
|
1450
|
-
z-index: 2;
|
|
1342
|
+
display: block;
|
|
1451
1343
|
}
|
|
1452
1344
|
|
|
1453
|
-
.new-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
.new-select__input {
|
|
1458
|
-
margin: 0px;
|
|
1459
|
-
padding: 0px;
|
|
1345
|
+
:not(.new-select__value-container--is-multi):focus-within .text-more-alt,
|
|
1346
|
+
:not(.new-select__value-container--is-multi):focus-within
|
|
1347
|
+
.text-main-alt-value {
|
|
1348
|
+
display: none !important;
|
|
1460
1349
|
}
|
|
1461
|
-
|
|
1462
|
-
.new-select__control--is-focused {
|
|
1463
|
-
// border: 1px solid ${({theme:e,backgroundColor:t})=>e.primary["primary-1"]};
|
|
1464
|
-
border: ${({theme:e,backgroundColor:t})=>t?"1px solid "+t:"1px solid "+e.primary["primary-1"]};
|
|
1465
|
-
}
|
|
1466
|
-
`;Ht.defaultProps={theme:R};const jt=h.default.div`
|
|
1350
|
+
`,jt=h.default.div`
|
|
1467
1351
|
// Default style
|
|
1468
1352
|
display: flex;
|
|
1469
1353
|
|
|
@@ -1475,7 +1359,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1475
1359
|
margin-left: 6px;
|
|
1476
1360
|
margin-top: -15.5px;
|
|
1477
1361
|
cursor: pointer;
|
|
1478
|
-
`,qt=({getValue:e,children:t,...l})=>{const a=e().length;return g.default.createElement(c.components.ValueContainer,l,t,a>1&&g.default.createElement("span",{className:"text-more-alt"},"& ",a-1," more"))},Zt=({label:e,labelStyle:t,optionArr:a,selectedValue:o,setSelectedValue:r,placeHolder:i,isClearable:n,isValid:s,height:d,fontSize:u,loadOptions:p,onInputChange:f,clearSelected:m,customWrapperStyles:b,customLabelStyles:h,isRequired:y,dropdownType:x,isDisabled:v,isLoading:C,id:A,iconName:w,iconStyles:S,iconColor:E,iconSize:V,showIndicator:z,leftIcon:M,leftIconColor:B,leftIconSize:I,backgroundColor:L,placeHolderColor:T,indicatorBackgroundColor:P,inputColor:H,menuListFooter:j,customSelectStyles:F,errorMessage:q,...Z})=>{const O=l.useTheme()||R,D=e=>{const t={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},l=g.default.createElement("div",{style:{...t,backgroundColor:e?.data?.color??O.primary["primary-1"]}},g.default.createElement(N,{icon:"check-icon",color:"white"})),a=g.default.createElement("div",{style:{...t,backgroundColor:"#e0e7ff"}});return g.default.createElement(c.components.Option,e,g.default.createElement("div",{style:{display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%"}},e.isSelected?l:a,g.default.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...t})=>{const l=t?.data?.label||"Select";return!e&&g.default.createElement("span",{className:"text-main-alt-value"},l)},X={control:(e,t)=>({...e,border:s?L&&s?"1px solid "+L:"1px solid "+O.border:"1px solid "+O.ui.error,minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px",height:`${d}px`,minHeight:`${d}px`,boxShadow:(t.isSelected||t.isFocused)&&"none",backgroundColor:t.isDisabled?O.variant["neutral-5"]:L||O.bgColor}),placeholder:e=>({...e,fontSize:u+"px",marginLeft:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"auto",maxWidth:"89%",marginRight:"0px",color:T||"hsl(0, 0%, 50%)"}),dropdownIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"2px",backgroundColor:P||"transparent",borderBottomLeftRadius:"0",borderBottomRightRadius:"4.32px",borderTopLeftRadius:0,borderTopRightRadius:"4.32px",position:"relative",top:"-1px",right:"-1px"}),clearIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,
|
|
1362
|
+
`,qt=({getValue:e,children:t,...l})=>{const a=e().length;return g.default.createElement(c.components.ValueContainer,l,t,a>1&&g.default.createElement("span",{className:"text-more-alt"},"& ",a-1," more"))},Zt=({label:e,labelStyle:t,optionArr:a,selectedValue:o,setSelectedValue:r,placeHolder:i,isClearable:n,isValid:s,height:d,fontSize:u,loadOptions:p,onInputChange:f,clearSelected:m,customWrapperStyles:b,customLabelStyles:h,isRequired:y,dropdownType:x,isDisabled:v,isLoading:C,id:A,iconName:w,iconStyles:S,iconColor:E,iconSize:V,showIndicator:z,leftIcon:M,leftIconColor:B,leftIconSize:I,backgroundColor:L,placeHolderColor:T,indicatorBackgroundColor:P,inputColor:H,menuListFooter:j,customSelectStyles:F,errorMessage:q,...Z})=>{const O=l.useTheme()||R,D=e=>{const t={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},l=g.default.createElement("div",{style:{...t,backgroundColor:e?.data?.color??O.primary["primary-1"]}},g.default.createElement(N,{icon:"check-icon",color:"white"})),a=g.default.createElement("div",{style:{...t,backgroundColor:"#e0e7ff"}});return g.default.createElement(c.components.Option,e,g.default.createElement("div",{style:{display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%"}},e.isSelected?l:a,g.default.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...t})=>{const l=t?.data?.label||"Select";return!e&&g.default.createElement("span",{className:"text-main-alt-value"},l)},X={control:(e,t)=>({...e,border:s?L&&s?"1px solid "+L:"1px solid "+O.border:"1px solid "+O.ui.error,minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px",height:`${d}px`,minHeight:`${d}px`,boxShadow:(t.isSelected||t.isFocused)&&"none",backgroundColor:t.isDisabled?O.variant["neutral-5"]:L||O.bgColor}),placeholder:e=>({...e,fontSize:u+"px",marginLeft:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"auto",maxWidth:"89%",marginRight:"0px",color:T||"hsl(0, 0%, 50%)"}),dropdownIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"2px",backgroundColor:P||"transparent",borderBottomLeftRadius:"0",borderBottomRightRadius:"4.32px",borderTopLeftRadius:0,borderTopRightRadius:"4.32px",position:"relative",top:"-1px",right:"-1px"}),clearIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,fontSize:u+"px",marginTop:"-4px"}),indicatorsContainer:e=>({...e,padding:0}),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%",minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px"}),singleValue:e=>({...e,fontSize:u+"px",marginLeft:"0px",width:"auto",marginRight:0,display:"grid"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto",display:"grid"}),input:e=>({...e,fontSize:u+"px",color:H||"hsl(0, 0%, 20%)",padding:0,margin:0}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?O.neutral["neutral-5"]:O.bgColor,padding:"10px",cursor:t.isDisabled?"not-allowed":"pointer",color:"#081348",opacity:t.isDisabled?.6:1,width:"inherit",boxSizing:"initial"}),menuPortal:e=>({...e,zIndex:99999999}),...F},J={DropdownIndicator:e=>{const t=g.default.createElement(c.components.DropdownIndicator,e,g.default.createElement(Ft,null,g.default.createElement(N,{icon:w,color:E,size:V,customstyles:S})));return!0===z?t:null},ValueContainer:qt,IndicatorSeparator:()=>null,ClearIndicator:e=>g.default.createElement(c.components.ClearIndicator,e,n?g.default.createElement(Ft,{onClick:()=>{m(),e.clearValue()}},g.default.createElement(N,{icon:"cross-icon",color:"black",size:8})):null),MenuList:e=>{const{MenuListHeader:t=null,MenuListFooter:l=null}=e.selectProps.components;return g.default.createElement(c.components.MenuList,e,e.children.length&&t,e.children,e.children.length&&l)},MenuListFooter:j};let U=null;switch(x){case"multiSelect":U=g.default.createElement(Ot,k({type:"multiSelect",MultiValue:G,Option:D,value:o,CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:v,stylesComp:X,setSelectedValue:r,isLoading:C,id:A,isClearable:n},Z));break;case"asyncSingleSelect":U=g.default.createElement(Dt,k({CommonRenderedComponent:J,loadOptions:p,onInputChange:f,styles:X,placeholder:i,onChange:r,isLoading:C,isDisabled:v,id:A,value:o,isClearable:n},Z));break;case"asyncMultiSelect":U=g.default.createElement(Dt,k({type:"asyncMultiSelect",CommonRenderedComponent:J,MultiValue:G,Option:D,onChange:r,placeholder:i,styles:X,isDisabled:v,isLoading:C,loadOptions:p,onInputChange:f,id:A,isClearable:n},Z));break;default:U=g.default.createElement(Ot,k({type:"singleSelect",value:{value:o?o.value:"",label:o?o.label:""},CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:v,stylesComp:X,setSelectedValue:r,isLoading:C,id:A,isClearable:n},Z))}return g.default.createElement(Ht,{style:b,backgroundColor:L,isValid:s,fontSize:u,theme:O,isDisabled:v},e&&g.default.createElement(jt,{inBuiltCss:W,labelWrapperStyle:"selectComp-label-wrapper",style:h},g.default.createElement(ot,{customStyles:t,type:"label-text",text:e,style:{marginBottom:"8px",paddingBottom:"0px"}}),y&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${O.ui.error}`}},"*")),U,!s&&q)},Ot=({type:e,Option:t,value:l,CommonRenderedComponent:a,MultiValue:o,optionArr:r,placeHolder:i,isDisabled:n,stylesComp:c,setSelectedValue:s,isLoading:d,id:u,isClearable:p,...f})=>{let m={...a};return"multiSelect"===e&&(m.MultiValue=o,m.Option=t),g.default.createElement(C.default,k({className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",components:m,options:r,placeholder:i,isDisabled:n,value:l,styles:c,onChange:s,isLoading:d,id:u,isClearable:p,isMulti:"multiSelect"===e,hideSelectedOptions:!1,closeMenuOnSelect:"multiSelect"!==e,menuShouldScrollIntoView:!1},f))},Dt=({CommonRenderedComponent:e,MultiValue:t,Option:l,type:a,id:o,styles:r,...i})=>{let n={...e};return"asyncMultiSelect"===a&&(n.MultiValue=t,n.Option=l),g.default.createElement(A.default,k({className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",components:n,isMulti:"asyncMultiSelect"===a,defaultOptions:!0,hideSelectedOptions:!1,closeMenuOnSelect:"asyncMultiSelect"!==a,isSearchable:!0,styles:r,menuShouldScrollIntoView:!1},i))};Zt.propTypes={label:b.default.string,labelStyle:b.default.object,optionArr:b.default.array,selectedValue:b.default.object,setSelectedValue:b.default.func,placeHolder:b.default.string,fontSize:b.default.number,clearSelected:b.default.func,loadOptions:b.default.func,onInputChange:b.default.func,customWrapperStyles:b.default.object,customLabelStyles:b.default.object,isRequired:b.default.bool,dropdownType:b.default.string,isDisabled:b.default.bool,isLoading:b.default.bool,isValid:b.default.bool,height:b.default.number,isClearable:b.default.bool,id:b.default.string,iconName:b.default.string,iconColor:b.default.string,iconSize:b.default.number,leftIcon:b.default.string,leftIconColor:b.default.string,leftIconSize:b.default.number,showIndicator:b.default.bool,backgroundColor:b.default.string,placeHolderColor:b.default.string,inputColor:b.default.string,menuListFooter:b.default.any,customSelectStyles:b.default.object},Zt.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:"",leftIconColor:"black",leftIconSize:10,showIndicator:!0,customSelectStyles:{}};const Gt=h.default.div`
|
|
1479
1363
|
//Set the styles from the default styles object
|
|
1480
1364
|
${({inBuiltCss:e,defaultStyles:t})=>T(e,t)}
|
|
1481
1365
|
|
|
@@ -1534,7 +1418,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1534
1418
|
align-items: center;
|
|
1535
1419
|
margin: 20px 0px;
|
|
1536
1420
|
font-size: 14px;
|
|
1537
|
-
`;const Kt=({label:e,labelStyle:a,labelInline:o,required:r,message:i,fileArr:n,setFileArr:c,deleteFile:s,customDropzoneStyles:d,customFileStyles:u,customTextStyles:p,customFileNameStyles:f,backgroundColor:m,singleFile:b,messageSize:h,showSupportedFormats:y,file_extensions:x,maxFilesAmount:v,minFilesAmount:C,fileSizeLimit:A,fileSizeNamingConvention:w,errorMessages:S,suggesionMessage:E,MessagelabelStyle:V,dropValid:z,setDropValid:M,dropzoneContent:B,dropIcon:I,iconColor:L,id:T,customTooltipContentStyle:P,customStylesTPArightBefore:H,customStylesTPArightAfter:j,...F})=>{const q=l.useTheme()||R,[Z,O]=t.useState(!1),D=t.createRef(),[G,X]=t.useState(z),[J,U]=t.useState("");let Y;var Q=x;let K=Q.map((e=>e.toLowerCase()));K=
|
|
1421
|
+
`;const Kt=({label:e,labelStyle:a,labelInline:o,required:r,message:i,fileArr:n,setFileArr:c,deleteFile:s,customDropzoneStyles:d,customFileStyles:u,customTextStyles:p,customFileNameStyles:f,backgroundColor:m,singleFile:b,messageSize:h,showSupportedFormats:y,file_extensions:x,maxFilesAmount:v,minFilesAmount:C,fileSizeLimit:A,fileSizeNamingConvention:w,errorMessages:S,suggesionMessage:E,MessagelabelStyle:V,dropValid:z,setDropValid:M,dropzoneContent:B,dropIcon:I,iconColor:L,id:T,customTooltipContentStyle:P,customStylesTPArightBefore:H,customStylesTPArightAfter:j,...F})=>{const q=l.useTheme()||R,[Z,O]=t.useState(!1),D=t.createRef(),[G,X]=t.useState(z),[J,U]=t.useState("");let Y;var Q=x;let K=new Map(Q.map((e=>[e.toLowerCase(),e])));K=Array.from(K.values()).join(", ");var $=!1,_=y?"All file formats cannot be used with the files you provided.":"",ee="";1==b&&(C=1,v=1);var te="Please upload (min."+C+" to max."+v+")files",le=e=>{ee="";let t=[];var l=0,a=n.length;if(a+e.length<C||a+e.length>v){var o=`Please upload (minimum ${C} to maximum ${v} files)`;ee=S?.amount,ee=void 0!==ee?ee:o}for(const e of n)e.size&&(l+=e.size);if(""==ee)for(const[a,n]of Object.entries(e)){$=!0,n.name,l+=n.size;var r=n.name.split(".");r=r[r.length-1],$=Q.includes(r.toLowerCase());var i=1024;("MB"===w||"GB"===w||"TB"===w)&&(i*=1024);var c=l/i;if(!1===$&&(ee=S?.format,ee=ee||_),c>A&&$){$=!1;o="The file(s) must be under "+A+" "+w;ee=S?.size,ee=void 0!==ee?ee:o}$&&(Y=URL.createObjectURL(n),n.path=Y,t.push(n))}return ee.length>0?(M(!1),X(z),U(ee)):(M(!0),X(z),U("")),t};function ae(e){e.preventDefault(),e.stopPropagation()}function oe(e,t){let l=[...n,...e];return t||(l=l.filter(((e,t,l)=>t===l.findIndex((t=>t.place===e.place&&t.name===e.name))))),c(l),O(!1),l}function re(e,t){if(e instanceof File){const t=n.findIndex((t=>t.name===e.name));let l=n[t].path;URL.revokeObjectURL(l);const a=n.filter((t=>t.name!==e.name));c(a)}else!function(e,t){const l=n.filter((t=>t.name!==e.name));c(l),s(e)}(e)}const ie=g.default.createElement("div",null,K);return g.default.createElement("div",null,g.default.createElement("div",{style:{display:"flex",width:"inherit"}},g.default.createElement(ot,k({customStyles:a,type:"label-text",labelInline:o,text:e,style:{display:"flex",marginBottom:`${o?0:"8px"}`,paddingBottom:"0px"}},F)),r&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${q.variant.error}`}},"*")),g.default.createElement(Gt,{theme:q,inBuiltCss:W,defaultStyles:"dropzone-parent",backgroundColor:m,customDropzoneStyles:z?d:{},onDragLeave:function(e){ae(e),O(!1)},onDragOver:function(e){ae(e),O(!0)},onDrop:function(e){ae(e);const{files:t}=e.dataTransfer;var l=le(t);O(!0),F.onFilesAdded(oe(l,b))},onClick:function(){D.current.click()},hover:Z,dropValid:z,fileArr:n},g.default.createElement(Jt,k({ref:D,valid:G,dropValid:z,type:"file",id:T,multiple:!b,onChange:function(e){let{files:t}=e.target;O(!1);var l=le(t);l&&F.onFilesAdded(oe(l,b))},onClick:e=>e.target.value=null},F)),z?g.default.createElement(g.default.Fragment,null,I?g.default.createElement(N,{icon:I,color:Z?q.bgColor:L,size:24}):g.default.createElement(N,{icon:"file-upload",color:Z?q.bgColor:q.primary["primary-1"],size:24})):null,g.default.createElement(Ut,{dropValid:z,valid:G,hover:Z,backgroundColor:m,customTextStyles:p,inBuiltCss:W,defaultStyles:"dropzone-text-div"},z?g.default.createElement(g.default.Fragment,null,B?g.default.createElement("div",{style:{color:Z?q.bgColor:null}},B):g.default.createElement("div",null,g.default.createElement("span",{style:{color:Z?q.bgColor:q.primary["primary-1"]}},"Choose a file"," "),g.default.createElement("span",{style:{color:Z?q.bgColor:q.neutral["neutral-2"]}},"or"," "),g.default.createElement("span",{style:{color:Z?q.bgColor:q.textColor}},"drag ",b?"it":"them"," here"))):g.default.createElement("div",null,g.default.createElement("span",{style:{color:q.variant.error}},"Try again!!"," "),g.default.createElement("span",{style:{color:q.textColor}},J||i)))),J===_||S.format?g.default.createElement("div",{style:{display:"flex"}},g.default.createElement(ot,k({themeColor:R,customStyles:V,type:"label-text",labelInline:o,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},F)),g.default.createElement(Ke,{contentTrigger:g.default.createElement("span",{style:{cursor:"pointer"}},"Click here to view the supported file types"),headerTooltip:"",contentTooltip:ie,footerTooltip:"",popperOptionsP:{placement:"bottom"},settings:{closeOnOutsideClick:!0,trigger:"click"},customTriggerStyle:{marginTop:"8px",marginLeft:"4px",textDecoration:"underline",color:q.variant["primary-1"]},customBodyStyle:{wordWrap:"break-word"},customContentStyle:P,customStylesTPArightBefore:H,customStylesTPArightAfter:j})):"The file size is not uploaded"===J?g.default.createElement(ot,k({themeColor:R,customStyles:V,type:"label-text",labelInline:o,text:te,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},F)):"",n?.map(((e,t)=>g.default.createElement(Xt,{inBuiltCss:W,defaultStyles:"dropzone-file-div",key:`${e}-${t}`,customFileStyles:u},g.default.createElement(Nt,null,g.default.createElement(N,{icon:"file-icon",color:q.primary["primary-1"]})),(File,g.default.createElement("a",{style:{color:q.variant["primary-1"],marginLeft:"5px"},href:e?.path,target:"_blank",rel:"noreferrer",download:e.name}," ",e.name)),g.default.createElement(Qt,null,e?.otherInfo),g.default.createElement(Yt,{key:101*Math.random()|0},g.default.createElement("div",{style:{marginRight:"7px"}},g.default.createElement(N,{icon:`${!(e instanceof File)&&"cloud-icon"}`,color:q.primary["primary-1"]})),g.default.createElement(N,{icon:"cross-icon",color:q.neutral["neutral-2"],size:13,onClick:()=>re(e),customstyles:{cursor:"pointer"}}))))))};Kt.propTypes={onFilesAdded:b.default.func,dropValid:b.default.bool,setDropValid:b.default.func,message:b.default.string,fileArr:b.default.array,setFileArr:b.default.func,customDropzoneStyles:b.default.object,customFileStyles:b.default.object,customTextStyles:b.default.object,customFileNameStyles:b.default.object,backgroundColor:b.default.string,messageSize:b.default.number,maxFilesAmount:b.default.number,minFilesAmount:b.default.number,fileSizeLimit:b.default.number,fileSizeNamingConvention:b.default.string,showSupportedFormats:b.default.bool,file_extensions:b.default.array,errorMessages:b.default.object,suggesionMessage:b.default.any,MessagelabelStyle:b.default.object,id:b.default.string,dropzoneContent:b.default.any,dropIcon:b.default.string,iconColor:b.default.string,singleFile:b.default.bool,customTooltipContentStyle:b.default.object,customStylesTPArightBefore:b.default.object,customStylesTPArightAfter:b.default.object},Kt.defaultProps={onFilesAdded:()=>null,dropValid:!0,message:"",fileArr:[],setFileArr:()=>{},customDropzoneStyles:{},customFileStyles:{},customTextStyles:{},customFileNameStyles:{},messageSize:100,additionalText:"",maxFilesAmount:5,minFilesAmount:1,fileSizeLimit:10,fileSizeNamingConvention:"MB",showSupportedFormats:!0,file_extensions:["doc","docx","jpg","JPG","pdf","png","xlsx","xlsr","xls"],errorMessages:{},MessagelabelStyle:{},suggesionMessage:"doc, docx, jpg, pdf, png, xlsx, xlsr, xls (Max 10MB)",id:"",iconColor:"black"};const $t=l.css`
|
|
1538
1422
|
pointer-events: none;
|
|
1539
1423
|
`,_t=h.default.input`
|
|
1540
1424
|
background-color: transparent;
|
|
@@ -1818,6 +1702,8 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1818
1702
|
color: ${R.variant["neutral-3"]};
|
|
1819
1703
|
}
|
|
1820
1704
|
background-color: ${({isDisabled:e,theme:t})=>e?t.variant["neutral-5"]:t.bgColor}};
|
|
1705
|
+
cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
1706
|
+
|
|
1821
1707
|
`,zl=l.css`
|
|
1822
1708
|
display: flex;
|
|
1823
1709
|
gap: 7px;
|
|
@@ -2048,11 +1934,21 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
2048
1934
|
background-color: ${({theme:e})=>e.bgColor};
|
|
2049
1935
|
padding: 24px 8px;
|
|
2050
1936
|
${({commentWrapperStyle:e})=>e};
|
|
1937
|
+
|
|
1938
|
+
.load-more {
|
|
1939
|
+
display: flex;
|
|
1940
|
+
justify-content: center;
|
|
1941
|
+
align-items: center;
|
|
1942
|
+
margin-bottom: 18.5px;
|
|
1943
|
+
:hover {
|
|
1944
|
+
button {
|
|
1945
|
+
text-decoration: underline;
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
2051
1949
|
`,oa=h.default.div`
|
|
2052
1950
|
margin-bottom: 24px;
|
|
2053
|
-
|
|
2054
1951
|
${({commentBodyStyle:e})=>e};
|
|
2055
|
-
|
|
2056
1952
|
`,ra=h.default.div`
|
|
2057
1953
|
display: flex;
|
|
2058
1954
|
flex-direction: row;
|
|
@@ -2094,7 +1990,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
2094
1990
|
`,da=h.default.div`
|
|
2095
1991
|
width: 100%;
|
|
2096
1992
|
margin-left: 16px;
|
|
2097
|
-
`,ua=({inputValue:e,setInputValue:a,commentArray:o,commentBodyStyle:r,commentWrapperStyle:i,commentHeadStyle:n,dateTimeStyle:c,commentDivStyle:s,inputWrapperStyle:d,onSave:u,myInfo:p,placeholder:f,loading:m,btnText:b,isLoading:h,viewOnly:y,...
|
|
1993
|
+
`,ua=({inputValue:e,setInputValue:a,commentArray:o,commentBodyStyle:r,commentWrapperStyle:i,commentHeadStyle:n,dateTimeStyle:c,commentDivStyle:s,inputWrapperStyle:d,onSave:u,myInfo:p,placeholder:f,loading:m,btnText:b,isLoading:h,viewOnly:y,commentTextBoxProps:x,loadMore:v,...C})=>{const A=l.useTheme()||R,[w,S]=t.useState(!1);return g.default.createElement(aa,{commentWrapperStyle:i,theme:A},m?g.default.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"24px"}},g.default.createElement(Le,{size:26})):g.default.createElement("div",null,o.map(((e,t)=>{const{name:l,date:a,comment:o,image:i}=e;return g.default.createElement(oa,{key:t,commentBodyStyle:r,theme:A},g.default.createElement(ra,{commentHeadStyle:n},g.default.createElement(pe,k({user:{fullName:l,userName:l,url:i},toggleName:!0,size:"LG",customStylesName:{color:A.textColor}},C)),g.default.createElement(ia,{dateTimeStyle:c,theme:A},a)),g.default.createElement(na,{commentDivStyle:s},o))})),v.visibility&&g.default.createElement("div",{className:"load-more"},g.default.createElement(Te,{onClick:v.callback},"Load more"))),!y&&g.default.createElement(ca,{theme:A,inputWrapperStyle:d},g.default.createElement(pe,{user:{fullName:p?.fullName,userName:p?.userName,url:p?.url},toggleName:!1,customStylesImage:{height:"36px",width:"36px"},customStylesContainer:{marginTop:"7px"}}),g.default.createElement(da,null,g.default.createElement(Bl,k({value:e,onChange:e=>a(e.target.value),placeholder:f,inputStyle:{height:"23px"},onFocus:e=>S(!0)},x)),w&&g.default.createElement(sa,null,g.default.createElement(je,k({size:"sm",onClick:u,isLoading:h},C),b.save),g.default.createElement(Te,{disabled:!!h,size:"sm",btnStyle:{color:A.variant["neutral-1"]},onClick:e=>S(!1)},b.cancel)))))};ua.propTypes={commentBodyStyle:b.default.object,commentWrapperStyle:b.default.object,commentHeadStyle:b.default.object,dateTimeStyle:b.default.object,commentDivStyle:b.default.object,inputWrapperStyle:b.default.object,onSave:b.default.func,commentArray:b.default.array,inputValue:b.default.string,setInputValue:b.default.func,myInfo:b.default.object,placeholder:b.default.string,loading:b.default.bool,btnText:b.default.object,viewOnly:b.default.bool,commentTextBoxProps:b.default.object,loadMore:b.default.object},ua.defaultProps={commentBodyStyle:{},commentWrapperStyle:{},commentHeadStyle:{},dateTimeStyle:{},commentDivStyle:{},inputWrapperStyle:{},onSave:()=>{},commentArray:[],inputValue:"",setInputValue:()=>{},myInfo:{},placeholder:"",loading:!1,btnText:{save:"Save",cancel:"Cancel"},viewOnly:!1,commentTextBoxProps:{isValid:!0,errorMessage:""},loadMore:{visibility:!1,callback:()=>{}}};const pa=h.default.div`
|
|
2098
1994
|
//Set the styles from the default styles object
|
|
2099
1995
|
${({theme:e,type:t})=>T(e,t)}
|
|
2100
1996
|
@media (max-width: 980px) {
|
|
@@ -3033,7 +2929,8 @@ ${({theme:e,type:t,customStyles:l})=>{if(e){let a={};if(e[t]){for(const t in e.c
|
|
|
3033
2929
|
|
|
3034
2930
|
// custom styles
|
|
3035
2931
|
${({progressBarStyle:e})=>e}
|
|
3036
|
-
|
|
2932
|
+
|
|
2933
|
+
`,ar=({labelStyle:e,progressBarStyle:a,progressWrapStyle:o,label:r,total:i,sections:n,innerContent:c,baseColor:s,baseTitle:d,labelProps:u,props:p})=>{const f=l.useTheme()||R,[m,b]=t.useState([[]]),[h,y]=t.useState(null);t.useEffect((()=>{n&&n.length>0&&b(n)}),[n]);const x=m?.length>0?m?.reduce(((e,t)=>e+t.count),0):0;x>i&&(i=x);const v=m?.length>0?m?.map((e=>e.count/i*100)):[],C=null!==h?m[h].label:d;return g.default.createElement("div",null,g.default.createElement(ot,k({inBuiltCss:W,customStyles:e,type:"progressBar-label",text:r},u)),g.default.createElement(tr,k({theme:f,progressWrapStyle:o,color:s,title:C},p),m?.map(((e,t)=>g.default.createElement(lr,k({key:t,onMouseEnter:()=>y(t),onMouseLeave:()=>y(null),progressBarStyle:a,theme:f,color:e.color,style:{width:v[t]+"%",left:0===t?0:v.slice(0,t).reduce(((e,t)=>e+t),0)+"%"}},p)))),g.default.createElement("div",{style:{position:"absolute",textAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",top:"50%",left:"50%",transform:"translate(-50%, -50%)",cursor:"default"},onMouseEnter:e=>((e,t)=>{e.stopPropagation(),y(t)})(e,h),onMouseLeave:e=>{e.stopPropagation(),y(null)}},c)))};ar.propTypes={labelStyle:b.default.object,progressBarStyle:b.default.object,progressWrapStyle:b.default.object,sections:b.default.arrayOf(b.default.shape({color:b.default.string.isRequired,percentage:b.default.number,count:b.default.number.isRequired})).isRequired},ar.defaultProps={labelStyle:{},progressBarStyle:{},progressWrapStyle:{},label:"",total:100,innerContent:"",baseColor:"",baseTitle:"Total Task",labelProps:{},props:{}};const or=h.default.div`
|
|
3037
2934
|
background: transparent;
|
|
3038
2935
|
display: flex;
|
|
3039
2936
|
align-items: center;
|