groundfloor-react-ui 1.2.5 → 1.2.6
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/components/DesignComponent/StyledComponent/StyledComponent.js +15 -1
- package/components/Form/FormComponent.js +10 -5
- package/components/Form/index.js +0 -1
- package/components/Inputs/NumericInput.js +1 -0
- package/components/Inputs/PasswordInput.js +1 -1
- package/components/Inputs/TextInput.js +1 -1
- package/dist/index.es.js +102 -101
- package/dist/index.js +102 -101
- package/package.json +1 -1
- package/components/Form/FormWrapper.js +0 -15
package/dist/index.es.js
CHANGED
|
@@ -822,20 +822,27 @@ ${({inBuiltCss:e,type:t,customStyles:o})=>{if(e){let r={};if(e[t]){for(const t i
|
|
|
822
822
|
max-width: 48%;
|
|
823
823
|
min-width: 48%;
|
|
824
824
|
|
|
825
|
-
`,Ye=s.
|
|
825
|
+
`,Ye=s.form`
|
|
826
|
+
width: 40vw;
|
|
827
|
+
display: flex;
|
|
828
|
+
justify-content: center;
|
|
829
|
+
flex-direction: column;
|
|
830
|
+
gap: 20px;
|
|
831
|
+
${({customStyles:e})=>e}
|
|
832
|
+
`,De=({customStyles:e,children:o})=>t.createElement(Ye,{customStyles:e},o),$e=s.div`
|
|
826
833
|
display: ${({vertical:e})=>e?"inline-block":"block"};
|
|
827
834
|
background: ${({theme:e,borderColor:t})=>t||e.neutral["neutral-5"]};
|
|
828
835
|
content: '';
|
|
829
836
|
height: ${({vertical:e,thickness:t,height:o})=>e?o:t};
|
|
830
837
|
width: ${({vertical:e,thickness:t})=>e?t:null};
|
|
831
|
-
`,
|
|
838
|
+
`,_e=({vertical:e,borderColor:o,thickness:r,height:l,...i})=>{const n=d()||M;return t.createElement($e,w({theme:n,borderColor:o,thickness:r,vertical:e,height:l},i))};_e.propTypes={thickness:e.string,borderColor:e.string,vertical:e.bool,height:e.string},_e.defaultProps={thickness:"2px",vertical:!1,height:"10px"};const et=s.div`
|
|
832
839
|
//Set the styles from the default styles object
|
|
833
840
|
${({inBuiltCss:e,type:t,drawerOpen:o,customStyles:r})=>{if(e){let l={};if(e[t]){for(const t in e.common)l[t]=e.common[t];for(const o in e[t])delete e.common[o],l[o]=e[t][o];l=o?{...l,...e["drawer-open"]}:{...l,...e["drawer-close"]}}return{...l,...r}}}}
|
|
834
|
-
`,
|
|
841
|
+
`,tt=({customStyles:e,drawerOpen:o,children:r,...l})=>t.createElement(et,w({inBuiltCss:W,customStyles:e,type:"drawer",drawerOpen:o},l),r);tt.propTypes={customStyles:e.object,drawerOpen:e.bool};class ot extends n{constructor(e){super(e),this.state={hasError:!1},this.refreshPage=this.refreshPage.bind(this)}componentDidCatch(e,t){this.setState({hasError:!0})}refreshPage(){window.location.reload()}render(){const{hasError:e}=this.state;return e?t.createElement(a,null,t.createElement("h3",null,t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1.12em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1856 1664"},t.createElement("path",{d:"M1056 1375v-190q0-14-9.5-23.5t-22.5-9.5H832q-13 0-22.5 9.5T800 1185v190q0 14 9.5 23.5t22.5 9.5h192q13 0 22.5-9.5t9.5-23.5zm-2-374l18-459q0-12-10-19q-13-11-24-11H818q-11 0-24 11q-10 7-10 21l17 457q0 10 10 16.5t24 6.5h185q14 0 23.5-6.5t10.5-16.5zm-14-934l768 1408q35 63-2 126q-17 29-46.5 46t-63.5 17H160q-34 0-63.5-17T50 1601q-37-63-2-126L816 67q17-31 47-49t65-18t65 18t47 49z",fill:"currentColor"})),"We have experienced an issue. We generated a support ticket on our end to investigate this issue We are sorry about the inconvenience."),t.createElement(ke,{onClick:()=>this.refreshPage()},"Click to refresh")):this.props.children}}ot.propTypes={children:e.any};const rt=p`
|
|
835
842
|
color: ${({theme:e})=>e.variant["primary-1"]};
|
|
836
843
|
border: 1px solid ${({theme:e})=>e.variant["primary-1"]};
|
|
837
844
|
background: ${({theme:e})=>xe(e.primary["primary-1"],.04)};
|
|
838
|
-
`,
|
|
845
|
+
`,lt=s.button`
|
|
839
846
|
font-size: 14px;
|
|
840
847
|
color: ${({theme:e})=>e.variant["primary-2"]};
|
|
841
848
|
background: ${({theme:e})=>xe(e.variant["neutral-5"],.7)};
|
|
@@ -845,17 +852,17 @@ ${({inBuiltCss:e,type:t,drawerOpen:o,customStyles:r})=>{if(e){let l={};if(e[t]){
|
|
|
845
852
|
outline: none;
|
|
846
853
|
cursor: pointer;
|
|
847
854
|
|
|
848
|
-
${({selected:e})=>e?
|
|
855
|
+
${({selected:e})=>e?rt:null}
|
|
849
856
|
|
|
850
857
|
&:not(:first-child) {
|
|
851
858
|
margin-left: 8px;
|
|
852
859
|
}
|
|
853
|
-
`,
|
|
860
|
+
`,it=({options:e,selected:o,onClick:r,...l})=>{const i=d()||M,n=e.map(((e,l)=>t.createElement(lt,{theme:i,key:`${e.label}_${l}_${e.value}`,selected:o===e.value,onClick:()=>{r(e.value)}},e.label)));return t.createElement(t.Fragment,null,n)};it.propTypes={options:e.array,selected:e.string,onClick:e.func},it.defaultProps={options:[],selected:""};const nt=s.footer`
|
|
854
861
|
//Set the styles from the default styles object
|
|
855
862
|
${({theme:e,type:t})=>ye(e,t)}
|
|
856
863
|
// custom styles
|
|
857
864
|
${({customStyles:e})=>e}
|
|
858
|
-
`,
|
|
865
|
+
`,at=o((({theme:e,customStyles:o,...r},l)=>t.createElement(nt,w({ref:l,theme:e,type:"footer",customStyles:o},r),r.children)));at.propTypes={theme:e.object,customStyles:e.object,type:e.string},nt.defaultProps={theme:e.object},at.defaultProps={theme:W,customStyles:null};const ct=s.div`
|
|
859
866
|
font-size: 14px;
|
|
860
867
|
background-color: transparent;
|
|
861
868
|
display: flex;
|
|
@@ -871,7 +878,7 @@ ${({inBuiltCss:e,type:t,drawerOpen:o,customStyles:r})=>{if(e){let l={};if(e[t]){
|
|
|
871
878
|
${({footerWidth:e})=>{if(e<650)return p`
|
|
872
879
|
flex-direction: column;
|
|
873
880
|
`}}
|
|
874
|
-
`,
|
|
881
|
+
`,st=s.div`
|
|
875
882
|
display: flex;
|
|
876
883
|
${({footerWidth:e})=>{if(e<650)return p`
|
|
877
884
|
margin-bottom: 5px;
|
|
@@ -881,29 +888,29 @@ ${({inBuiltCss:e,type:t,drawerOpen:o,customStyles:r})=>{if(e){let l={};if(e[t]){
|
|
|
881
888
|
align-items: center;
|
|
882
889
|
margin-bottom: 0;
|
|
883
890
|
`}}
|
|
884
|
-
`,
|
|
891
|
+
`,dt=s.div`
|
|
885
892
|
margin-top: inherit;
|
|
886
893
|
margin-bottom: inherit;
|
|
887
894
|
${({footerWidth:e})=>{if(e<350)return p`
|
|
888
895
|
margin-bottom: 5px;
|
|
889
896
|
`}}
|
|
890
|
-
`,
|
|
897
|
+
`,pt=s.div`
|
|
891
898
|
margin: 0 10px;
|
|
892
899
|
${({footerWidth:e})=>{if(e<350)return p`
|
|
893
900
|
display: none;
|
|
894
901
|
`}}
|
|
895
|
-
`,
|
|
902
|
+
`,mt=({variant:e,textColor:o,size:r,width:l,footerWidth:i,...n})=>t.createElement(ct,w({variant:e,textColor:o,footerWidth:i},n),t.createElement(st,{footerWidth:i},t.createElement(dt,{footerWidth:i},"Premise HQ"),t.createElement(pt,{footerWidth:i},"|"),t.createElement(dt,{footerWidth:i},"All Rights Restricted 2020 ©")),t.createElement(st,{footerWidth:i},t.createElement(dt,{footerWidth:i},"Terms of use"),t.createElement(pt,{footerWidth:i},"|"),t.createElement(dt,{footerWidth:i},"Privacy Policy"))),ut=s.header`
|
|
896
903
|
//Set the styles from the default styles object
|
|
897
904
|
${({theme:e,type:t})=>ye(e,t)}
|
|
898
905
|
// custom styles
|
|
899
906
|
${({customStyles:e})=>e}
|
|
900
|
-
`,
|
|
907
|
+
`,gt=({theme:e,type:o,customStyles:r,...l})=>t.createElement(ut,w({theme:e,type:"header",customStyles:r},l),l.children);gt.propTypes={theme:e.object,customStyles:e.object,type:e.string},ut.defaultProps={theme:e.object},gt.defaultProps={theme:W,type:"header",customStyles:null};const bt=s.label`
|
|
901
908
|
//Set the styles from the default styles object
|
|
902
909
|
${({theme:e,type:t})=>ye(e,t)}
|
|
903
910
|
|
|
904
911
|
// custom styles
|
|
905
912
|
${({customStyles:e})=>e}
|
|
906
|
-
`,
|
|
913
|
+
`,ft=({customStyles:e,text:o,className:r,required:l,...i})=>{const n=W;return t.createElement(bt,w({required:l,theme:n,customStyles:e,type:"label"},i),o,l&&t.createElement("div",{style:{marginLeft:"4px",color:`${M.variant.error}`}},"*"))};ft.propTypes={customStyles:e.object,text:e.string},ft.defaultProps={text:""};const ht=s.div`
|
|
907
914
|
box-sizing: initial;
|
|
908
915
|
|
|
909
916
|
//Set the styles from the default styles object
|
|
@@ -914,7 +921,7 @@ ${({inBuiltCss:e,type:t,drawerOpen:o,customStyles:r})=>{if(e){let l={};if(e[t]){
|
|
|
914
921
|
|
|
915
922
|
// custom styles
|
|
916
923
|
${({checkBoxOuterStyle:e})=>e}
|
|
917
|
-
`;
|
|
924
|
+
`;ht.defaultProps={theme:M};const yt=s.div`
|
|
918
925
|
box-sizing: initial;
|
|
919
926
|
|
|
920
927
|
//Set the styles from the default styles object
|
|
@@ -929,7 +936,7 @@ ${({inBuiltCss:e,type:t,drawerOpen:o,customStyles:r})=>{if(e){let l={};if(e[t]){
|
|
|
929
936
|
align-items: center;
|
|
930
937
|
// custom styles
|
|
931
938
|
${({checkBoxInnerStyle:e})=>e}
|
|
932
|
-
`;
|
|
939
|
+
`;yt.defaultProps={theme:M};const xt=s.span`
|
|
933
940
|
//Set the styles from the default styles object
|
|
934
941
|
${({inBuiltCss:e,type:t})=>ye(e,t)}
|
|
935
942
|
|
|
@@ -939,7 +946,7 @@ ${({inBuiltCss:e,type:t,drawerOpen:o,customStyles:r})=>{if(e){let l={};if(e[t]){
|
|
|
939
946
|
|
|
940
947
|
// custom styles
|
|
941
948
|
${({optionTextStyle:e})=>e}
|
|
942
|
-
`;
|
|
949
|
+
`;xt.defaultProps={theme:M};const At=s.label`
|
|
943
950
|
width: fit-content;
|
|
944
951
|
margin-bottom: ${({inline:e})=>e?"":"18px !important"};
|
|
945
952
|
cursor: pointer;
|
|
@@ -949,10 +956,10 @@ ${({inBuiltCss:e,type:t,drawerOpen:o,customStyles:r})=>{if(e){let l={};if(e[t]){
|
|
|
949
956
|
|
|
950
957
|
// custom styles
|
|
951
958
|
${({wrapperStyles:e})=>e}
|
|
952
|
-
`,
|
|
959
|
+
`,vt=s.div`
|
|
953
960
|
flex-direction: ${({inline:e})=>e?"row":"column"};
|
|
954
961
|
width: ${({inline:e})=>e?"initial":"auto"};
|
|
955
|
-
`,
|
|
962
|
+
`,Ct=({getCheckedArr:e,checkBoxOuterStyle:o,checkBoxInnerStyle:r,optionTextStyle:l,defaultBorderColor:n,defaultTextColor:a,checkedTextColor:c,checkedCheckBoxColor:s,labelStyle:p,label:m,options:u,setOptions:g,wrapperStyles:b,inline:f,wrapperStyle:h,isRequired:y,...x})=>{const A=d()||M;i((()=>{v(u)}),[]);const v=t=>{let o=t.filter((e=>!1!==e.checked));e(o)},C=Object.assign({display:"flex",flexDirection:"column",flexWrap:"wrap"},h);return t.createElement("div",w({style:C},x),t.createElement("div",{style:{display:"flex"}},t.createElement(ft,w({customStyles:p,type:"check-label",text:m},x)),y&&t.createElement("div",{style:{marginLeft:"4px",color:`${A.variant.error}`}},"*")),t.createElement(vt,w({style:{display:"flex",flexWrap:"wrap"},inline:f},x),u?.map(((e,i)=>t.createElement(At,w({inline:f,id:e.id,key:`${e.name}-${i}`,onClick:()=>{((e,t)=>{let o=[...u];o[t].checked=!e.checked,g(o),v(o)})(e,i)},wrapperStyles:b},x),e.checked?t.createElement(yt,w({theme:A,inBuiltCss:W,defaultCheckBoxInnerStyle:"checkBox-inner",checkBoxInnerStyle:{...r,cursor:e?.disabled?"not-allowed ":" pointer",borderColor:e?.disabled&&e?.disabledColor},defaultBorderColor:n,checkedCheckBoxColor:s,checked:!e?.disabled&&e.checked},x),t.createElement(X,{icon:"check-icon",size:18,color:"white"})):t.createElement(ht,w({inBuiltCss:W,defaultCheckBoxOuterStyle:"checkBox-outer",checkBoxOuterStyle:{...o,cursor:e?.disabled?"not-allowed ":" pointer",borderColor:e?.disabledColor},defaultBorderColor:n,theme:A},x)),t.createElement(xt,{theme:A,inline:f,optionTextStyle:{...l,cursor:e?.disabled?"not-allowed ":" pointer",color:e?.disabledColor},checked:e.checked,defaultTextColor:a,checkedTextColor:c},e.label))))))};Ct.propTypes={wrapperStyle:e.object,label:e.string,labelStyle:e.object,checkBoxOuterStyle:e.object,checkBoxInnerStyle:e.object,optionTextStyle:e.object,defaultTextColor:e.string,checkedTextColor:e.string,defaultBorderColor:e.string,checkedCheckBoxColor:e.string,inline:e.bool,options:e.array,setOptions:e.func,getCheckedArr:e.func,isRequired:e.bool,wrapperStyles:e.object},Ct.defaultProps={label:"",inline:!1,options:[],setOptions:()=>{},getCheckedArr:()=>{},labelStyle:{},checkBoxOuterStyle:{},checkBoxInnerStyle:{},isRequired:!0,wrapperStyles:{}};const wt=s.div`
|
|
956
963
|
border: 1px solid ${({theme:e})=>e.variant["neutral-4"]};
|
|
957
964
|
background-color: ${({theme:e})=>e.bgColor};
|
|
958
965
|
|
|
@@ -964,7 +971,7 @@ ${({inBuiltCss:e,defaultColorWrapperStyle:t})=>ye(e,t)}
|
|
|
964
971
|
// custom styles
|
|
965
972
|
${({customColorWrapperStyle:e})=>e}
|
|
966
973
|
|
|
967
|
-
`,
|
|
974
|
+
`,St=s.input`
|
|
968
975
|
|
|
969
976
|
border: 0.5px solid ${({theme:e})=>e.variant["neutral-4"]};
|
|
970
977
|
box-shadow: 0px 5px 37px rgba(56, 66, 100, 0.0880136);
|
|
@@ -985,7 +992,7 @@ padding: 0;
|
|
|
985
992
|
${({inBuiltCss:e,defaultInputColorStyle:t})=>ye(e,t)}
|
|
986
993
|
// custom styles
|
|
987
994
|
${({customInputColorStyle:e})=>e}
|
|
988
|
-
`,
|
|
995
|
+
`,Et=({label:e,labelStyle:o,value:r,setValue:l,customInputColorStyle:i,customColorWrapperStyle:n,id:a,...c})=>{const s=d()||M;return t.createElement(wt,w({customColorWrapperStyle:n,defaultColorWrapperStyle:"ColorWrapper",theme:s,inBuiltCss:W},c),t.createElement(St,w({id:a,customInputColorStyle:i,defaultInputColorStyle:"input-color",inBuiltCss:W,theme:s},c,{type:"color",value:r,onChange:e=>{l(e.target.value)}})),t.createElement(ft,w({themeColor:M,customStyles:o,type:"label-text",text:e,style:{display:"flex",paddingBottom:"0px",paddingLeft:"10px"}},c)))};Et.propTypes={label:e.string,labelStyle:e.object,value:e.string,setValue:e.func,customInputColorStyle:e.object,customColorWrapperStyle:e.object,id:e.string},Et.defaultProps={label:"",labelStyle:{},customInputColorStyle:{},customColorWrapperStyle:{},value:"#FFFFFF",setValue:()=>{},id:""};const kt=s.div`
|
|
989
996
|
display: flex;
|
|
990
997
|
cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
991
998
|
|
|
@@ -1124,24 +1131,24 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1124
1131
|
.react-datepicker::after {
|
|
1125
1132
|
box-sizing: initial !important;
|
|
1126
1133
|
}
|
|
1127
|
-
`;
|
|
1134
|
+
`;kt.defaultProps={theme:M};const zt=s.div`
|
|
1128
1135
|
display: flex;
|
|
1129
1136
|
align-items: flex-start;
|
|
1130
1137
|
justify-content: center;
|
|
1131
1138
|
font-size: 16px;
|
|
1132
1139
|
padding-top: 12px;
|
|
1133
1140
|
padding-bottom: 15px;
|
|
1134
|
-
`,
|
|
1141
|
+
`,Vt=s.div`
|
|
1135
1142
|
display: flex;
|
|
1136
1143
|
justify-content: center;
|
|
1137
1144
|
margin-left: 6px;
|
|
1138
|
-
`,
|
|
1145
|
+
`,Mt=s("div")`
|
|
1139
1146
|
width: inherit;
|
|
1140
|
-
`,
|
|
1147
|
+
`,Bt=s("div")`
|
|
1141
1148
|
display: flex;
|
|
1142
1149
|
flex-direction: row;
|
|
1143
1150
|
cursor: pointer;
|
|
1144
|
-
`,
|
|
1151
|
+
`,It=s("div")`
|
|
1145
1152
|
margin-top: 8px;
|
|
1146
1153
|
position: absolute;
|
|
1147
1154
|
z-index: 100;
|
|
@@ -1152,7 +1159,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1152
1159
|
background: white;
|
|
1153
1160
|
box-shadow: 0px 6px 20px rgb(56 66 100 / 15%);
|
|
1154
1161
|
border-radius: 4px;
|
|
1155
|
-
`,
|
|
1162
|
+
`,Wt=s("ul")`
|
|
1156
1163
|
list-style: none;
|
|
1157
1164
|
padding: 0;
|
|
1158
1165
|
margin: 12px;
|
|
@@ -1179,7 +1186,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1179
1186
|
background-color: ${({theme:e})=>e.neutral["neutral-4"]};
|
|
1180
1187
|
border-radius: 10px;
|
|
1181
1188
|
}
|
|
1182
|
-
`;
|
|
1189
|
+
`;Wt.defaultProps={theme:M};const Rt=s("li")`
|
|
1183
1190
|
text-align: left;
|
|
1184
1191
|
font-style: normal;
|
|
1185
1192
|
font-weight: normal;
|
|
@@ -1188,7 +1195,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1188
1195
|
padding-left: 12px;
|
|
1189
1196
|
padding-bottom: 12px;
|
|
1190
1197
|
cursor: pointer;
|
|
1191
|
-
`,
|
|
1198
|
+
`,Pt=({startDate:e,setStartDate:o,disabled:n,theme:a,...c})=>{const s=d()||M,p=["January","February","March","April","May","June","July","August","September","October","November","December"];for(var m=[],u=2010;u<=(new Date).getFullYear()+10;u++)m.push(u);const g=r(null),f=r(null),[h,y]=l(!1),[x,A]=l(!1),[v,C]=l(!1),[S,E]=l(!1),[k,z]=l(e.getFullYear()),[V,B]=l(p[e.getMonth()]);i((()=>{B(p[e.getMonth()]),z(e.getFullYear())}),[e]),i((()=>(document.addEventListener("click",I,!0),()=>{document.removeEventListener("click",I,!0)})),[]);const I=e=>{g.current&&!g.current.contains(e.target)&&y(!1)},W=e=>{f.current&&!f.current.contains(e.target)&&A(!1)};return i((()=>(document.addEventListener("click",W,!0),()=>{document.removeEventListener("click",W,!0)})),[]),t.createElement(kt,w({disabled:n,theme:a},c),t.createElement(b,{selected:e,dateFormat:"dd/MM/yyyy",useWeekdaysShort:!0,onChange:e=>o(e),placeholderText:"select date",adjustDateOnChange:!0,disabled:n,dropdownMode:"select",renderCustomHeader:({date:e,changeYear:o,changeMonth:r})=>t.createElement(zt,null,t.createElement("div",{style:{display:"flex"}},t.createElement(Mt,{ref:g},t.createElement(Bt,{onClick:()=>{y(!h),A(!1)}},t.createElement("span",{onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),style:{color:`${v?s.variant["primary-1"]:s.textColor}`}},p[e.getMonth()]),t.createElement(Vt,null,t.createElement(X,{icon:"triangle-down",color:v?s.variant["primary-1"]:s.textColor,size:7}))),h&&t.createElement(It,null,t.createElement(Wt,{theme:a,onMouseEnter:()=>C(!0)},p.map(((e,o)=>t.createElement(Rt,{selectedMonth:V,onClick:()=>{C(!1),r(o),y(!1),B(p[o])},key:Math.random()},t.createElement("span",{style:{color:`${V===e?s.variant["primary-1"]:s.textColor}`}},e))))))),t.createElement(Mt,{ref:f},t.createElement(Bt,{style:{marginLeft:"28px"},onClick:()=>{A(!x),y(!1)}},t.createElement("span",{onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),style:{color:`${S?s.variant["primary-1"]:s.textColor}`}},e.getFullYear()),t.createElement(Vt,null,t.createElement(X,{icon:"triangle-down",color:S?s.variant["primary-1"]:s.textColor,size:7}))),x&&t.createElement(It,null,t.createElement(Wt,{onMouseEnter:()=>E(!0)},m.map(((e,r)=>t.createElement(Rt,{onClick:()=>{E(!1),o(e),z(e),A(!1)},key:Math.random()},t.createElement("span",{style:{color:`${k===e?s.variant["primary-1"]:s.textColor}`}},e)))))))))}))};Pt.propTypes={startDate:e.any,setStartDate:e.func,disabled:e.bool,theme:e.object},Pt.defaultProps={theme:M,startDate:"",setStartDate:()=>{},disabled:!1};const Lt=s.div`
|
|
1192
1199
|
|
|
1193
1200
|
.master-dropdown,
|
|
1194
1201
|
.new-select {
|
|
@@ -1335,7 +1342,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1335
1342
|
.new-select__control--is-focused {
|
|
1336
1343
|
border: 1px solid ${({theme:e})=>e.primary["primary-1"]};
|
|
1337
1344
|
}
|
|
1338
|
-
`;
|
|
1345
|
+
`;Lt.defaultProps={theme:M};const qt=s.div`
|
|
1339
1346
|
// Default style
|
|
1340
1347
|
display: flex;
|
|
1341
1348
|
|
|
@@ -1343,11 +1350,11 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1343
1350
|
${({inBuiltCss:e,labelWrapperStyle:t})=>ye(e,t)}
|
|
1344
1351
|
// custom styles
|
|
1345
1352
|
${({customLabelStyles:e})=>e}
|
|
1346
|
-
`,
|
|
1353
|
+
`,Ht=s.div`
|
|
1347
1354
|
margin-left: 6px;
|
|
1348
1355
|
margin-top: -14px;
|
|
1349
1356
|
cursor: pointer;
|
|
1350
|
-
`,
|
|
1357
|
+
`,Tt=({label:e,labelStyle:o,optionArr:r,selectedValue:l,setSelectedValue:i,placeHolder:n,isClearable:a,isValid:c,height:s,fontSize:p,loadOptions:m,onInputChange:u,clearSelected:g,customWrapperStyles:b,customLabelStyles:x,isRequired:A,dropdownType:v,isDisabled:C,isLoading:S,id:E,iconName:k,iconColor:z,iconSize:V,showIndicator:B,leftIcon:I,leftIconColor:R,leftIconSize:P,...L})=>{const q=d()||M,H=e=>{const o=t.createElement(h.DropdownIndicator,e,t.createElement(Ht,null,t.createElement(X,{icon:k,color:z,size:V})));return!0===B?o:null},T=e=>t.createElement(h.ClearIndicator,e,a?t.createElement(Ht,{onClick:()=>{g(),e.clearValue()}},t.createElement(X,{icon:"cross-icon",color:"black",size:8})):null),j=({getValue:e,children:o,...r})=>{const l=e().length;return t.createElement(h.ValueContainer,r,""===I?null:t.createElement(Ht,{style:{paddingTop:"10px",paddingRight:"8px",marginLeft:"0",marginTop:"-16px"}},t.createElement(X,{icon:I,color:R,size:P})),o,l>1&&t.createElement("span",{className:"text-more-alt"},"& ",l-1," more"))},F=e=>{const o={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},r=t.createElement("div",{style:{...o,backgroundColor:e?.data?.color??q.primary["primary-1"]}},t.createElement(X,{icon:"check-icon",color:"white"})),l=t.createElement("div",{style:{...o,backgroundColor:"#e0e7ff"}});return t.createElement(h.Option,e,t.createElement("div",{style:{display:"flex",justifyContent:"start",alignItems:"center",width:"100%"}},e.isSelected?r:l,t.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...o})=>{const r=o?.data?.label||"Select";return!e&&t.createElement("span",{className:"text-main-alt-value"},r)},O={control:(e,t)=>({...e,border:c?"1px solid "+q.border:"1px solid "+q.ui.error,minWidth:"226px",height:`${s}px`,minHeight:`${s}px`,boxShadow:(t.isSelected||t.isFocused)&&"none"}),placeholder:e=>({...e,fontSize:p+"px",marginLeft:"0px"}),dropdownIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),clearIndicator:e=>({...e,height:`${s}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,display:"flex",justifyContent:"space-between",fontSize:p+"px"}),indicatorsContainer:e=>({...e,padding:0,height:`${s}px`}),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:p+"px",width:"100%",minWidth:"226px"}),singleValue:e=>({...e,fontSize:p+"px",marginLeft:"0px",width:"auto"}),multiValue:e=>({...e,marginLeft:"0px",width:"auto"}),input:e=>({...e,fontSize:p+"px"}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?q.neutral["neutral-5"]:q.bgColor,padding:"10px",cursor:"pointer",color:"#081348",width:"inherit"}),...L.styles};return t.createElement(Lt,{style:b,isValid:c,fontSize:p,theme:q},e&&t.createElement(qt,{inBuiltCss:W,labelWrapperStyle:"selectComp-label-wrapper",style:x},t.createElement(ft,{customStyles:o,type:"label-text",text:e,style:{marginBottom:"7px",paddingBottom:"0px"}}),A&&t.createElement("div",{style:{marginLeft:"4px",color:`${q.ui.error}`}},"*")),"multiSelect"===v?t.createElement(f,w({components:{DropdownIndicator:H,MultiValue:G,Option:F,ValueContainer:j,IndicatorSeparator:()=>null,ClearIndicator:T},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",onChange:i,placeholder:n,value:l,options:r,styles:O,isMulti:!0,isDisabled:C,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:S,id:E,isClearable:a},L)):"asyncSingleSelect"===v?t.createElement(y,w({loadOptions:m,defaultOptions:!0,onInputChange:u,styles:O,components:{DropdownIndicator:H,ValueContainer:j,IndicatorSeparator:()=>null,ClearIndicator:T},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",placeholder:n,onChange:i,isLoading:S,isDisabled:C,id:E,isClearable:a},L)):"asyncMultiSelect"===v?t.createElement(y,w({components:{DropdownIndicator:H,MultiValue:G,ValueContainer:j,Option:F,IndicatorSeparator:()=>null,ClearIndicator:T},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",onChange:i,placeholder:n,styles:O,isMulti:!0,isDisabled:C,hideSelectedOptions:!1,closeMenuOnSelect:!1,isSearchable:!0,isLoading:S,loadOptions:m,defaultOptions:!0,onInputChange:u,id:E,isClearable:a},L)):t.createElement(f,w({components:{DropdownIndicator:H,ValueContainer:j,IndicatorSeparator:()=>null,ClearIndicator:T},className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",options:r,placeholder:n,isDisabled:C,value:{value:l?l.value:"",label:l?l.label:""},styles:O,onChange:i,isLoading:S,id:E,isClearable:a},L)))};Tt.propTypes={label:e.string,labelStyle:e.object,optionArr:e.array,selectedValue:e.object,setSelectedValue:e.func,placeHolder:e.string,fontSize:e.number,clearSelected:e.func,loadOptions:e.func,onInputChange:e.func,customWrapperStyles:e.object,customLabelStyles:e.object,isRequired:e.bool,dropdownType:e.string,isDisabled:e.bool,isLoading:e.bool,isValid:e.bool,height:e.number,isClearable:e.bool,id:e.string,iconName:e.string,iconColor:e.string,iconSize:e.number,leftIcon:e.string,leftIconColor:e.string,leftIconSize:e.number,showIndicator:e.bool},Tt.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};const jt=s.div`
|
|
1351
1358
|
//Set the styles from the default styles object
|
|
1352
1359
|
${({inBuiltCss:e,defaultStyles:t})=>ye(e,t)}
|
|
1353
1360
|
|
|
@@ -1364,48 +1371,48 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1364
1371
|
|
|
1365
1372
|
// custom styles
|
|
1366
1373
|
${({customDropzoneStyles:e})=>e}
|
|
1367
|
-
`,
|
|
1374
|
+
`,Ft=s.div`
|
|
1368
1375
|
//Set the styles from the default styles object
|
|
1369
1376
|
${({inBuiltCss:e,defaultStyles:t})=>ye(e,t)}
|
|
1370
1377
|
|
|
1371
1378
|
// custom styles
|
|
1372
1379
|
${({customFileStyles:e})=>e}
|
|
1373
|
-
`,
|
|
1380
|
+
`,Gt=s.input`
|
|
1374
1381
|
display: none;
|
|
1375
|
-
`,
|
|
1382
|
+
`,Xt=s.div`
|
|
1376
1383
|
//Set the styles from the default styles object
|
|
1377
1384
|
${({inBuiltCss:e,defaultStyles:t})=>ye(e,t)}
|
|
1378
1385
|
|
|
1379
1386
|
// custom styles
|
|
1380
1387
|
${({customTextStyles:e})=>e}
|
|
1381
|
-
`,
|
|
1388
|
+
`,Ot=s.span`
|
|
1382
1389
|
//Set the styles from the default styles object
|
|
1383
1390
|
${({inBuiltCss:e,type:t})=>ye(e,t)}
|
|
1384
1391
|
|
|
1385
1392
|
// custom styles
|
|
1386
1393
|
${({customFileNameStyles:e})=>e}
|
|
1387
|
-
`,
|
|
1394
|
+
`,Zt=s.div`
|
|
1388
1395
|
cursor: pointer;
|
|
1389
1396
|
padding-left: 1px;
|
|
1390
1397
|
margin-left: auto;
|
|
1391
1398
|
margin-right: 10px;
|
|
1392
1399
|
display: flex;
|
|
1393
1400
|
justify-content: center;
|
|
1394
|
-
`,
|
|
1401
|
+
`,Jt=s.div`
|
|
1395
1402
|
margin-left: 11px;
|
|
1396
1403
|
padding-left: 2px;
|
|
1397
|
-
`,
|
|
1404
|
+
`,Ut=s.div`
|
|
1398
1405
|
color: #494949;
|
|
1399
1406
|
margin-left: 11px;
|
|
1400
1407
|
padding-left: 2px;
|
|
1401
|
-
`,
|
|
1408
|
+
`,Qt=s.p`
|
|
1402
1409
|
color: #494949;
|
|
1403
1410
|
display: flex;
|
|
1404
1411
|
justify-content: center;
|
|
1405
1412
|
align-items: center;
|
|
1406
1413
|
margin: 20px 0px;
|
|
1407
1414
|
font-size: 14px;
|
|
1408
|
-
`,
|
|
1415
|
+
`,Kt=({isValid:e,label:o,labelStyle:r,labelInline:i,required:n,message:a,fileArr:s,setFileArr:p,deleteFile:m,customDropzoneStyles:u,customFileStyles:g,customTextStyles:b,customFileNameStyles:f,backgroundColor:h,singleFile:y,messageSize:x,additionalText:A,id:v,...C})=>{const S=d()||M,[E,k]=l(!1),z=c();function V(e){e.preventDefault(),e.stopPropagation()}function B(e,t){let o=1==t?[]:[...s];for(let t=0;t<e.length;t++)o.push(e.item(t));return t||(o=o.filter(((e,t,o)=>t===o.findIndex((t=>t.place===e.place&&t.name===e.name))))),p(o),k(!1),o}function I(e,t){if(e instanceof File){const t=s.filter((t=>t.name!==e.name));p(t)}else!function(e,t){const o=s.filter((t=>t.name!==e.name));p(o),m(e)}(e)}return t.createElement("div",null,t.createElement("div",{style:{display:"flex",width:"inherit"}},t.createElement(ft,w({customStyles:r,type:"label-text",labelInline:i,text:o,style:{display:"flex",marginBottom:""+(i?"":"7px"),paddingBottom:"0px"}},C)),n&&t.createElement("div",{style:{marginLeft:"4px",color:`${S.variant.error}`}},"*")),t.createElement(jt,{theme:S,inBuiltCss:W,defaultStyles:"dropzone-parent",backgroundColor:h,customDropzoneStyles:u,onDragLeave:function(e){V(e),k(!1)},onDragOver:function(e){V(e),k(!0)},onDrop:function(e){V(e);const{files:t}=e.dataTransfer;k(!0),C.onFilesAdded(B(t,y))},onClick:function(){z.current.click()},hover:E,isValid:e,fileArr:s},t.createElement(Gt,w({ref:z,type:"file",id:v,multiple:1!=y,onChange:function(e){const{files:t}=e.target;k(!1),C.onFilesAdded(B(t,y))},onClick:e=>e.target.value=null},C)),e?t.createElement(X,{icon:"file-upload",color:E?S.bgColor:S.primary["primary-1"],size:24}):null,t.createElement(Xt,{isValid:e,hover:E,customTextStyles:b,inBuiltCss:W,defaultStyles:"dropzone-text-div"},e?t.createElement("div",null,t.createElement("span",{style:{color:E?S.bgColor:S.primary["primary-1"]}},"Choose a file"," "),t.createElement("span",{style:{color:E?S.bgColor:S.neutral["neutral-2"]}},"or"," "),t.createElement("span",{style:{color:E?S.bgColor:S.textColor}},"drag ",y?"it":"them"," here")):t.createElement("div",null,t.createElement("span",{style:{color:S.variant.error}},"Try again!!"," "),t.createElement("span",{style:{color:S.textColor}},a.length>x?a.slice(0,x):a)))),A.length>0&&t.createElement(Qt,null,A)," ",s?.map(((e,o)=>t.createElement(Ft,{inBuiltCss:W,defaultStyles:"dropzone-file-div",key:`${e}-${o}`,customFileStyles:g},t.createElement(Jt,null,t.createElement(X,{icon:"file-icon",color:S.primary["primary-1"]})),e instanceof File?t.createElement(Ot,{inBuiltCss:W,type:"dropzone-file-name",customFileNameStyles:f},e.name):t.createElement("a",{style:{color:S.variant["primary-1"],marginLeft:"5px"},href:e?.path,target:"_blank",rel:"noreferrer"}," ",e.name),t.createElement(Ut,null,e?.otherInfo),t.createElement(Zt,{key:101*Math.random()|0,onClick:()=>I(e)},t.createElement("div",{style:{marginRight:"7px"}},t.createElement(X,{icon:`${!(e instanceof File)&&"cloud-icon"}`,color:S.primary["primary-1"]})),t.createElement(X,{icon:"cross-icon",color:S.neutral["neutral-2"],size:13}))))))};Kt.propTypes={onFilesAdded:e.func,isValid:e.bool,message:e.string,fileArr:e.array,setFileArr:e.func,customDropzoneStyles:e.object,customFileStyles:e.object,customTextStyles:e.object,customFileNameStyles:e.object,backgroundColor:e.string,messageSize:e.number,additionalText:e.string,id:e.string},Kt.defaultProps={onFilesAdded:()=>null,isValid:!0,message:"",fileArr:[],setFileArr:()=>{},customDropzoneStyles:{},customFileStyles:{},customTextStyles:{},customFileNameStyles:{},messageSize:100,additionalText:"",id:""};const Nt=s.div`
|
|
1409
1416
|
border: 1px solid
|
|
1410
1417
|
${({theme:e})=>e.border};
|
|
1411
1418
|
border-radius: 4px;
|
|
@@ -1425,7 +1432,8 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1425
1432
|
fill: ${({theme:e})=>e.variant["primary-1"]};
|
|
1426
1433
|
}
|
|
1427
1434
|
}
|
|
1428
|
-
`;
|
|
1435
|
+
`;Nt.defaultProps={theme:M};const Yt=s.input`
|
|
1436
|
+
width: 85%;
|
|
1429
1437
|
border: 0;
|
|
1430
1438
|
outline: 0;
|
|
1431
1439
|
color: ${({theme:e})=>e.variant["primary-2"]};
|
|
@@ -1437,12 +1445,12 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1437
1445
|
|
|
1438
1446
|
// custom styles
|
|
1439
1447
|
${({inputStyle:e})=>e}
|
|
1440
|
-
`;
|
|
1448
|
+
`;Yt.defaultProps={theme:M},p`
|
|
1441
1449
|
&:after {
|
|
1442
1450
|
content: ' *';
|
|
1443
1451
|
color: ${({theme:e})=>e.variant.error};
|
|
1444
1452
|
}
|
|
1445
|
-
`;const
|
|
1453
|
+
`;const Dt=s.label`
|
|
1446
1454
|
display: flex;
|
|
1447
1455
|
margin-right: 10px;
|
|
1448
1456
|
align-content: center;
|
|
@@ -1453,16 +1461,16 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1453
1461
|
margin-right: ${({labelInline:e})=>e?"7px":""};
|
|
1454
1462
|
padding-bottom: 0px;
|
|
1455
1463
|
color: ${({theme:e})=>e.variant["neutral-2"]};
|
|
1456
|
-
`;
|
|
1464
|
+
`;Dt.defaultProps={theme:M};const $t=p`
|
|
1457
1465
|
display: flex;
|
|
1458
1466
|
align-items: center;
|
|
1459
|
-
`,
|
|
1460
|
-
${({labelInline:e})=>e
|
|
1467
|
+
`,_t=s.div`
|
|
1468
|
+
${({labelInline:e})=>e?$t:null}
|
|
1461
1469
|
|
|
1462
1470
|
> div {
|
|
1463
1471
|
flex: 1 0 auto;
|
|
1464
1472
|
}
|
|
1465
|
-
`;
|
|
1473
|
+
`;_t.defaultProps={theme:M};const eo=({label:e,inputValue:o,inputStyle:r,iconBefore:l,iconAfter:i,onChange:n,theme:a,id:c,...s})=>t.createElement(_t,s,e.length>0&&t.createElement(Dt,s,e),t.createElement("div",null,t.createElement(Nt,s,t.createElement("div",{className:"input-icon"},l),t.createElement(Yt,w({},s,{inputStyle:r,value:o,onChange:e=>{const{value:t}=e.currentTarget;(""===t||/^[0-9\b.-]+$/.test(t))&&n(t)},type:"number",id:c})),t.createElement("div",{className:"input-icon"},i))));eo.propTypes={theme:e.object,label:e.string,labelInline:e.bool,inputValue:e.any,inputStyle:e.object,id:e.string},eo.defaultProps={theme:M,label:"",labelInline:!1,inputStyle:{},inputValue:null,id:""};const to=s.div`
|
|
1466
1474
|
//Set the styles from the default styles object
|
|
1467
1475
|
${({inBuiltCss:e,defaultWrapperStyle:t})=>ye(e,t)}
|
|
1468
1476
|
|
|
@@ -1486,8 +1494,8 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1486
1494
|
|
|
1487
1495
|
// custom styles
|
|
1488
1496
|
${({textBoxStyle:e})=>e}
|
|
1489
|
-
`;
|
|
1490
|
-
width:
|
|
1497
|
+
`;to.defaultProps={theme:M};const oo=s.input`
|
|
1498
|
+
width: 85%;
|
|
1491
1499
|
-webkit-text-security: ${({showEye:e})=>e?"none":"disc"} ;
|
|
1492
1500
|
|
|
1493
1501
|
//Set the styles from the default styles object
|
|
@@ -1500,18 +1508,18 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1500
1508
|
color: ${({theme:e})=>e.variant["neutral-3"]};
|
|
1501
1509
|
}
|
|
1502
1510
|
|
|
1503
|
-
`;
|
|
1511
|
+
`;oo.defaultProps={theme:M};const ro=p`
|
|
1504
1512
|
display: flex;
|
|
1505
1513
|
gap: 7px;
|
|
1506
1514
|
align-items: start;
|
|
1507
|
-
`,
|
|
1508
|
-
${({labelInline:e})=>e?
|
|
1515
|
+
`,lo=s.div`
|
|
1516
|
+
${({labelInline:e})=>e?ro:null}
|
|
1509
1517
|
.err-text {
|
|
1510
1518
|
color: ${({theme:e})=>e.variant.error};
|
|
1511
1519
|
margin-top: 5px;
|
|
1512
1520
|
font-size: 10px;
|
|
1513
1521
|
}
|
|
1514
|
-
`;
|
|
1522
|
+
`;lo.defaultProps={theme:M};const io=({theme:e,passwordRules:o,textBoxStyle:r,labelStyle:i,inputStyle:n,errMsg:a,required:c,label:s,labelInline:d,isValid:p,rulesStyle:m,id:u,showHideIcon:g,...b})=>{const[f,h]=l(!1);return t.createElement(lo,w({labelInline:d,inBuiltCss:W},b),t.createElement("div",{style:{display:"flex"}},t.createElement(ft,w({customStyles:i,type:"label-text",text:s,errMsg:a,style:{display:"flex",marginBottom:""+(d?"0px":"7px"),paddingBottom:"0px"}},b)),c&&t.createElement("div",{style:{marginLeft:"4px",marginRight:"5px",color:`${e.variant.error}`}},"*")),t.createElement("div",{style:{display:"flex",justifyContent:"start",alignItems:"start"}},t.createElement(to,w({required:c,theme:e,textBoxStyle:r,isValid:p,defaultWrapperStyle:"textbox-wrapper",inBuiltCss:W},b),t.createElement(oo,w({inputStyle:n,type:"text",id:u,showEye:f,theme:e,defaultInputStyle:"input-wrapper",inBuiltCss:W},b)),!0===g?t.createElement("div",{className:"input-icon",onClick:()=>h(!f)},f?t.createElement(X,{icon:"eye-show"}):t.createElement(X,{icon:"eye-hide"})):""),o?t.createElement("div",{style:{...m,marginLeft:"5px"}},o):""),a.length>0&&t.createElement("div",{className:"err-text"},a))};io.propTypes={inBuiltCss:e.object,theme:e.object,label:e.string,required:e.bool,labelInline:e.bool,errMsg:e.string,textBoxStyle:e.object,labelStyle:e.object,inputStyle:e.object,passwordRules:e.string,rulesStyle:e.object,id:e.string,showHideIcon:e.bool},io.defaultProps={theme:M,inBuiltCss:W,label:"",required:!1,isValid:!0,labelInline:!1,errMsg:"",textBoxStyle:{},labelStyle:{},inputStyle:{},passwordRules:"",rulesStyle:{},id:"",showHideIcon:!0};const no=s.div`
|
|
1515
1523
|
box-sizing: initial;
|
|
1516
1524
|
|
|
1517
1525
|
//Set the styles from the default styles object
|
|
@@ -1521,7 +1529,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1521
1529
|
|
|
1522
1530
|
// custom styles
|
|
1523
1531
|
${({radioOuterCircleStyle:e})=>e}
|
|
1524
|
-
`;
|
|
1532
|
+
`;no.defaultProps={theme:M};const ao=s.div`
|
|
1525
1533
|
box-sizing: initial;
|
|
1526
1534
|
|
|
1527
1535
|
//Set the styles from the default styles object
|
|
@@ -1533,7 +1541,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1533
1541
|
|
|
1534
1542
|
// custom styles
|
|
1535
1543
|
${({radioInnerCircleStyle:e})=>e}
|
|
1536
|
-
`;
|
|
1544
|
+
`;ao.defaultProps={theme:M};const co=s.div`
|
|
1537
1545
|
//Set the styles from the default styles object
|
|
1538
1546
|
${({inBuiltCss:e,defaultOptionStyle:t})=>ye(e,t)}
|
|
1539
1547
|
margin-right: ${({inline:e})=>e?"":"30px"};
|
|
@@ -1541,7 +1549,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1541
1549
|
|
|
1542
1550
|
// custom styles
|
|
1543
1551
|
${({optionStyle:e})=>e}
|
|
1544
|
-
`;
|
|
1552
|
+
`;co.defaultProps={theme:M};const so=s.div`
|
|
1545
1553
|
margin-bottom: ${({inline:e})=>e?"":"14px"};
|
|
1546
1554
|
cursor: pointer;
|
|
1547
1555
|
align-items: center;
|
|
@@ -1550,11 +1558,11 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1550
1558
|
|
|
1551
1559
|
// custom styles
|
|
1552
1560
|
${({WrapperDivStyle:e})=>e}
|
|
1553
|
-
`,
|
|
1561
|
+
`,po=s.div`
|
|
1554
1562
|
display: ${({inline:e})=>e?"flex":"inline-block"};
|
|
1555
1563
|
width: max-content;
|
|
1556
1564
|
margin: 0;
|
|
1557
|
-
`,
|
|
1565
|
+
`,mo=({radioOuterCircleStyle:e,radioInnerCircleStyle:o,labelStyle:r,label:l,optionStyle:i,options:n,selectedCircleColor:a,selectedOptionTextColor:c,onChange:s,selected:p,width:m,height:u,inline:g,defaultBorderColor:b,defaultOptionColor:f,WrapperDivStyle:h,...y})=>{const x=d()||M;return t.createElement("div",null,t.createElement(ft,{customStyles:r,type:"radio-label",text:l}),t.createElement(po,{inline:g},n.map(((r,l)=>t.createElement(so,{WrapperDivStyle:h,key:l+101*Math.random(),id:r.id,inline:g,onClick:()=>{!r?.disabled&&s(r.value)}},t.createElement(no,{theme:x,inBuiltCss:W,defaultBorderColor:b,selectedCircleColor:a,radioOuterCircleStyle:{...e,cursor:r?.disabled?"not-allowed ":" pointer",borderColor:r?.disabled&&r?.disabledColor},defaultRadioOuterCircleStyle:"radio-outer-circle",value:r.value,selected:!r?.disabled&&p},t.createElement(ao,{inBuiltCss:W,theme:x,width:m,height:u,selectedCircleColor:a,radioInnerCircleStyle:{...o,cursor:r?.disabled?"not-allowed ":" pointer",backgroundColor:r?.disabled?"transparent":r?.value===p?o?.backgroundColor:"transparent"},defaultRadioInnerCircleStyle:"radio-inner-circle",value:r.value,selected:p})),t.createElement(co,{defaultOptionColor:f,optionStyle:{...i,cursor:r?.disabled?"not-allowed ":" pointer",color:r?.disabled&&r?.disabledColor},inBuiltCss:W,defaultOptionStyle:"option-text",selectedOptionTextColor:c,theme:x,selected:!r?.disabled&&r.value===p},r.label))))))};mo.propTypes={label:e.string,labelStyle:e.object,inline:e.bool,options:e.array,optionStyle:e.object,WrapperDivStyle:e.object,selected:e.string,onChange:e.func,defaultOptionColor:e.string,defaultBorderColor:e.string,radioOuterCircleStyle:e.object,radioInnerCircleStyle:e.object,width:e.string,height:e.string,selectedCircleColor:e.string,selectedOptionTextColor:e.string},mo.defaultProps={label:"",labelStyle:{},inline:!1,options:[],optionStyle:{},selected:"one",onChange:()=>{},radioOuterCircleStyle:{},radioInnerCircleStyle:{},width:"14px",height:"14px",WrapperDivStyle:{}};const uo=s.div`
|
|
1558
1566
|
//Set the styles from the default styles object
|
|
1559
1567
|
${({inBuiltCss:e,defaultWrapperStyle:t})=>ye(e,t)}
|
|
1560
1568
|
|
|
@@ -1577,8 +1585,8 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1577
1585
|
${({textBoxStyle:e})=>e}
|
|
1578
1586
|
|
|
1579
1587
|
background-color: ${({isDisabled:e,theme:t})=>e?t.variant["neutral-5"]:t.bgColor}
|
|
1580
|
-
`,
|
|
1581
|
-
width:
|
|
1588
|
+
`,go=s.input`
|
|
1589
|
+
width: 85%;
|
|
1582
1590
|
//Set the styles from the default styles object
|
|
1583
1591
|
${({inBuiltCss:e,defaultInputStyle:t})=>ye(e,t)}
|
|
1584
1592
|
|
|
@@ -1589,18 +1597,18 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1589
1597
|
color: ${M.variant["neutral-3"]};
|
|
1590
1598
|
}
|
|
1591
1599
|
background-color: ${({isDisabled:e,theme:t})=>e?t.variant["neutral-5"]:t.bgColor}
|
|
1592
|
-
`,
|
|
1600
|
+
`,bo=p`
|
|
1593
1601
|
display: flex;
|
|
1594
1602
|
gap: 7px;
|
|
1595
1603
|
align-items: center;
|
|
1596
|
-
`,
|
|
1597
|
-
${({labelInline:e})=>e?
|
|
1604
|
+
`,fo=s.div`
|
|
1605
|
+
${({labelInline:e})=>e?bo:null}
|
|
1598
1606
|
.err-text {
|
|
1599
1607
|
color: ${({theme:e})=>e.variant.error};
|
|
1600
1608
|
margin-top: 5px;
|
|
1601
1609
|
font-size: 10px;
|
|
1602
1610
|
}
|
|
1603
|
-
`;
|
|
1611
|
+
`;fo.defaultProps={theme:M};const ho=({textBoxStyle:e,labelStyle:o,inputStyle:r,errMsg:l,required:i,label:n,labelInline:a,iconBefore:c,iconAfter:s,isValid:d,type:p,theme:m,isDisabled:u,id:g,...b})=>t.createElement(fo,w({labelInline:a},b,{theme:m}),t.createElement("div",{style:{display:"flex"}},t.createElement(ft,w({customStyles:o,type:"label-text",labelInline:a,text:n,errMsg:l,style:{display:"flex",marginBottom:""+(a?"":"7px"),paddingBottom:"0px"}},b)),i&&t.createElement("div",{style:{marginLeft:"4px",color:`${m.variant.error}`}},"*")),t.createElement(uo,w({required:i,isDisabled:u,theme:m,textBoxStyle:e,isValid:d,inBuiltCss:W,defaultWrapperStyle:"textbox-wrapper"},b),t.createElement("div",{className:"input-icon"},c),t.createElement(go,w({inputStyle:r,type:p,theme:m,id:g,defaultInputStyle:"input-wrapper",isDisabled:u,disabled:u},b)),t.createElement("div",{className:"input-icon"},s)),l.length>0&&t.createElement("div",{className:"err-text"},l));ho.propTypes={inBuiltCss:e.object,label:e.string,required:e.bool,labelInline:e.bool,errMsg:e.string,iconBefore:e.any,iconAfter:e.any,textBoxStyle:e.object,labelStyle:e.object,inputStyle:e.object,type:e.string,isDisabled:e.bool,theme:e.object,id:e.string},go.defaultProps={theme:M},uo.defaultProps={theme:M},fo.defaultProps={theme:M},ho.defaultProps={theme:M,inBuiltCss:W,label:"",required:!1,isValid:!0,labelInline:!1,errMsg:"",iconBefore:null,iconAfter:null,textBoxStyle:{},labelStyle:{},inputStyle:{},type:"text",isDisabled:!1,id:""};const yo=({label:e,placeholder:o,handleSearch:r,searchInput:l,customStylesForm:i,customStyleObject:n,textBoxStyle:a,id:c,...s})=>t.createElement(ho,w({iconAfter:t.createElement(X,{icon:"magnifier-icon"}),label:e,textBoxStyle:a,placeholder:o,ref:l,onChange:r,id:c},s)),xo=s.div`
|
|
1604
1612
|
//Set the styles from the default styles object
|
|
1605
1613
|
${({inBuiltCss:e,defaultParentDivStyle:t})=>ye(e,t)}
|
|
1606
1614
|
|
|
@@ -1609,7 +1617,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1609
1617
|
&:focus-within {
|
|
1610
1618
|
border-color: ${({activeColor:e,theme:t})=>e||t.primary["primary-1"]};
|
|
1611
1619
|
}
|
|
1612
|
-
`,
|
|
1620
|
+
`,Ao=s.div`
|
|
1613
1621
|
//Set the styles from the default styles object
|
|
1614
1622
|
${({inBuiltCss:e,defaultWrapperDivStyle:t})=>ye(e,t)}
|
|
1615
1623
|
|
|
@@ -1621,7 +1629,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1621
1629
|
border-left: ${({signIcon:e})=>e?"":"none"};
|
|
1622
1630
|
margin-left: ${({signIcon:e})=>e?"":"42px"};
|
|
1623
1631
|
position: ${({signIcon:e})=>e?"absolute":""};
|
|
1624
|
-
`,
|
|
1632
|
+
`,vo=s.div`
|
|
1625
1633
|
width: 39px;
|
|
1626
1634
|
height: 44px;
|
|
1627
1635
|
display: flex;
|
|
@@ -1631,7 +1639,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1631
1639
|
border-bottom: ${({penIcon:e,isMyInputFocused:t,activeColor:o,defaultColor:r,theme:l})=>e?t?`1px solid ${o||l.primary["primary-1"]}`:`1px solid ${r||l.neutral["neutral-3"]}`:""};
|
|
1632
1640
|
background-color: rgba(255, 255, 255, 0.05);
|
|
1633
1641
|
cursor: pointer;
|
|
1634
|
-
`,
|
|
1642
|
+
`,Co=s.input`
|
|
1635
1643
|
${({inBuiltCss:e,defaultInputStyle:t})=>ye(e,t)}
|
|
1636
1644
|
|
|
1637
1645
|
border-bottom: ${({value:e,defaultColor:t,theme:o})=>e.length>0?"none":t};
|
|
@@ -1656,17 +1664,17 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1656
1664
|
|
|
1657
1665
|
// custom styles
|
|
1658
1666
|
${({customInputStyle:e})=>e}
|
|
1659
|
-
`,
|
|
1667
|
+
`,wo=s.div`
|
|
1660
1668
|
position: relative;
|
|
1661
1669
|
width: inherit;
|
|
1662
1670
|
display: flex;
|
|
1663
1671
|
margin: 4px;
|
|
1664
|
-
`,
|
|
1672
|
+
`,So=s.div`
|
|
1665
1673
|
padding-left: 2px;
|
|
1666
1674
|
display: flex;
|
|
1667
1675
|
justify-content: center;
|
|
1668
1676
|
cursor: pointer;
|
|
1669
|
-
`,
|
|
1677
|
+
`,Eo=({onChange:e,activeColor:o,defaultColor:n,placeholderColor:a,placeholderText:c,customInputStyle:s,pointsArray:p,setPointsArray:m,value:u,setValue:g,valueForSignatureDrawing:b,setValueForSignatureDrawing:f,imageURL:h,setImageURL:y,id:A,...v})=>{const C=d()||M,[w,S]=l("default"),[E,k]=l(!1),[z,V]=l(!1),B=r(null);i((()=>{z&&(R(),f(B.current))}),[!0===z]);const I=()=>{g(""),f(B.current),B.current&&B.current.clear(),k(!1),V(!1)},R=()=>(m(B.current.toData()),y(B.current.toDataURL("image/png")),[h,p]);return t.createElement(xo,{inBuiltCss:W,defaultParentDivStyle:"signature-parent-div",isMyInputFocused:E,selected:w,activeColor:o,defaultColor:n,theme:C},t.createElement(Ao,{inBuiltCss:W,defaultWrapperDivStyle:"signature-wrapper-div",activeColor:o,defaultColor:n,selected:w,isMyInputFocused:E,signIcon:!0,theme:C},t.createElement(vo,{activeColor:o,defaultColor:n,isMyInputFocused:E,theme:C,penIcon:!0,onClick:()=>{S("default"),I()}},t.createElement(X,{icon:"pen-icon",color:"default"===w?o||C.primary["primary-1"]:C.black})),t.createElement(vo,{activeColor:o,defaultColor:n,theme:C,isMyInputFocused:E,penIcon:!1,onClick:()=>{S("sign"),I()}},t.createElement(X,{icon:"sign-icon",color:"default"!==w?o||C.primary["primary-1"]:C.black}))),t.createElement(Ao,{inBuiltCss:W,defaultWrapperDivStyle:"signature-wrapper-div",activeColor:o,defaultColor:n,theme:C,selected:w,isMyInputFocused:E,signIcon:!1,onTouchStart:()=>{}},"default"===w?t.createElement(Co,{inBuiltCss:W,defaultInputStyle:"signature-input-text",placeholder:c,placeholderColor:a,customInputStyle:s,onBlur:()=>k(!1),onFocus:()=>k(!0),id:A,value:u,defaultColor:n,theme:C,onChange:e=>g(e.target.value)}):t.createElement(wo,{onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),onClick:()=>{V(!0),R()}},t.createElement(x,{ref:B,id:A,redrawOnResize:!0,height:75,options:{minWidth:1,maxWidth:1,penColor:"#444444"}})),(u||z)&&t.createElement(So,{selected:w,onClick:()=>I()},t.createElement(X,{icon:"cross-icon",color:n||C.neutral["neutral-3"]}))))};Eo.propTypes={activeColor:e.string,defaultColor:e.string,placeholderColor:e.string,placeholderText:e.string,customInputStyle:e.object,pointsArray:e.any,setPointsArray:e.func,value:e.string,setValue:e.func,imageURL:e.string,setImageURL:e.func,id:e.string},Eo.defaultProps={customInputStyle:{},placeholderText:"Type your signature here",pointsArray:null,setPointsArray:()=>{},value:"",setValue:()=>{},imageURL:"",setImageURL:()=>{},setValueForSignatureDrawing:()=>{},id:""};const ko=s.div`
|
|
1670
1678
|
//Set the styles from the default styles object
|
|
1671
1679
|
${({inBuiltCss:e,defaultWrapperStyle:t})=>ye(e,t)}
|
|
1672
1680
|
|
|
@@ -1687,19 +1695,19 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1687
1695
|
|
|
1688
1696
|
// custom styles
|
|
1689
1697
|
${({textAreaStyle:e})=>e}
|
|
1690
|
-
`,
|
|
1698
|
+
`,zo=s.textarea`
|
|
1691
1699
|
//Set the styles from the default styles object
|
|
1692
1700
|
${({inBuiltCss:e,defaultInputStyle:t})=>ye(e,t)}
|
|
1693
1701
|
margin: 0;
|
|
1694
1702
|
overflow: auto;
|
|
1695
1703
|
resize: vertical // custom styles
|
|
1696
1704
|
${({inputStyle:e})=>e};
|
|
1697
|
-
`,
|
|
1705
|
+
`,Vo=p`
|
|
1698
1706
|
display: flex;
|
|
1699
1707
|
gap: 7px;
|
|
1700
1708
|
align-items: center;
|
|
1701
|
-
`,
|
|
1702
|
-
${({labelInline:e})=>e?
|
|
1709
|
+
`,Mo=s.div`
|
|
1710
|
+
${({labelInline:e})=>e?Vo:null}
|
|
1703
1711
|
${({customStylesForm:e})=>{if(e)return{...e}}}
|
|
1704
1712
|
position: relative;
|
|
1705
1713
|
.err-text {
|
|
@@ -1707,7 +1715,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1707
1715
|
margin-top: 5px;
|
|
1708
1716
|
font-size: 10px;
|
|
1709
1717
|
}
|
|
1710
|
-
`,
|
|
1718
|
+
`,Bo=t.forwardRef((({customStylesForm:e,textAreaStyle:o,labelStyle:r,inputStyle:l,errMsg:i,required:n,label:a,labelInline:c,iconBefore:s,iconAfter:p,isValid:m,rows:u,cols:g,id:b,...f},h)=>{const y=d()||M;return t.createElement(Mo,w({labelInline:c,customStylesForm:e,theme:y},f),t.createElement("div",{style:{display:"flex"}},t.createElement(ft,w({customStyles:r,type:"label-text",labelInline:c,text:a,errMsg:i,style:{display:"flex",marginBottom:""+(c?"":"7px"),paddingBottom:"0px"}},f)),n&&t.createElement("div",{style:{marginLeft:"4px",color:`${y.variant.error}`}},"*")),t.createElement(ko,w({theme:y,required:n,textAreaStyle:o,isValid:m,inBuiltCss:W,defaultWrapperStyle:"textbox-wrapper"},f),t.createElement("div",{className:"input-icon"},s),t.createElement(zo,w({ref:h,inputStyle:l,defaultInputStyle:"textarea-wrapper",cols:g,rows:u,inBuiltCss:W,id:b},f,{size:"1"})),t.createElement("div",{className:"input-icon"},p)),t.createElement("div",{className:"err-text"},i))}));Bo.propTypes={rows:e.number,label:e.string,required:e.bool,labelInline:e.bool,errMsg:e.string,iconBefore:e.any,iconAfter:e.any,textAreaStyle:e.object,labelStyle:e.object,inputStyle:e.object,id:e.string},Bo.defaultProps={label:"",required:!1,isValid:!0,labelInline:!1,errMsg:"",iconBefore:null,iconAfter:null,textAreaStyle:{},labelStyle:{},inputStyle:{},rows:3,id:""};const Io=s.div`
|
|
1711
1719
|
color: #a9b1b8;
|
|
1712
1720
|
font-size: 21px;
|
|
1713
1721
|
border: 1px solid
|
|
@@ -1721,7 +1729,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1721
1729
|
border: 1px solid ${({theme:e})=>e.variant["primary-1"]};
|
|
1722
1730
|
outline: none;
|
|
1723
1731
|
}
|
|
1724
|
-
`,
|
|
1732
|
+
`,Wo=s.input`
|
|
1725
1733
|
border: 0;
|
|
1726
1734
|
outline: 0;
|
|
1727
1735
|
color: ${({theme:e})=>e.variant["primary-2"]};
|
|
@@ -1731,23 +1739,23 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1731
1739
|
width: 24px;
|
|
1732
1740
|
text-align:center;
|
|
1733
1741
|
background-color: ${({theme:e})=>e.bgColor};
|
|
1734
|
-
`,
|
|
1742
|
+
`,Ro=p`
|
|
1735
1743
|
&:after {
|
|
1736
1744
|
content: ' *';
|
|
1737
1745
|
color: ${({theme:e})=>e.variant.error};
|
|
1738
1746
|
}
|
|
1739
|
-
`,
|
|
1747
|
+
`,Po=s.label`
|
|
1740
1748
|
display: block;
|
|
1741
1749
|
margin-bottom: ${({labelInline:e,errMsg:t})=>e&&t?"18px":"7px"};
|
|
1742
1750
|
margin-right: ${({labelInline:e})=>e?"7px":""};
|
|
1743
1751
|
color: ${({theme:e})=>e.variant["neutral-2"]};
|
|
1744
|
-
${({required:e})=>e?
|
|
1752
|
+
${({required:e})=>e?Ro:null}
|
|
1745
1753
|
padding-bottom: 0px;
|
|
1746
|
-
`,
|
|
1754
|
+
`,Lo=p`
|
|
1747
1755
|
display: flex;
|
|
1748
1756
|
align-items: center;
|
|
1749
|
-
`,
|
|
1750
|
-
${({labelInline:e})=>e?
|
|
1757
|
+
`,qo=s.div`
|
|
1758
|
+
${({labelInline:e})=>e?Lo:null}
|
|
1751
1759
|
.err-text {
|
|
1752
1760
|
color: ${({theme:e})=>e.variant.error};
|
|
1753
1761
|
margin-top: 5px;
|
|
@@ -1757,7 +1765,7 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1757
1765
|
> div {
|
|
1758
1766
|
flex: 1 0 auto;
|
|
1759
1767
|
}
|
|
1760
|
-
`,
|
|
1768
|
+
`,Ho=s.button`
|
|
1761
1769
|
border: none;
|
|
1762
1770
|
outline: none;
|
|
1763
1771
|
border-radius: 4px;
|
|
@@ -1766,9 +1774,9 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1766
1774
|
padding: 5px 6px;
|
|
1767
1775
|
font-size: 18px;
|
|
1768
1776
|
cursor: pointer;
|
|
1769
|
-
`,
|
|
1777
|
+
`,To=({label:e,errMsg:o,hour:r,minute:l,period:i,onChange:n,id:a,...c})=>{const s=d()||M;return t.createElement(qo,w({theme:s},c),t.createElement(Po,w({theme:s},c,{errMsg:o}),e),t.createElement("div",null,t.createElement(Io,w({theme:s,id:a},c),t.createElement(Wo,{theme:s,value:r,onChange:function(e){const t=e.currentTarget.value>12?12:parseFloat(e.currentTarget.value)||0;n({hour:t,minute:l,period:i})}}),":",t.createElement(Wo,{theme:s,value:l,onChange:function(e){console.log("minute change",e.currentTarget.value);const t=e.currentTarget.value>59?59:parseFloat(e.currentTarget.value)||0;n({hour:r,minute:t,period:i})}}),t.createElement(Ho,{theme:s,onClick:function(e){n({hour:r,minute:l,period:"AM"===i?"PM":"AM"})}},i)),t.createElement("div",{className:"err-text"},o)))};To.propTypes={label:e.string,hour:e.number.isRequired,minute:e.number.isRequired,period:e.string.isRequired,required:e.bool,labelInline:e.bool,isValid:e.bool,errMsg:e.string,id:e.string},To.defaultProps={label:"",hour:0,minute:0,period:"AM",required:!1,labelInline:!1,isValid:!0,errMsg:"",id:""};const jo=s.div`
|
|
1770
1778
|
${({inBuiltCss:e,defaultCheckBoxWrapperStyle:t})=>ye(e,t)}
|
|
1771
|
-
`,
|
|
1779
|
+
`,Fo=s.label`
|
|
1772
1780
|
//Set the styles from the default styles object
|
|
1773
1781
|
${({inBuiltCss:e,defaultCheckBoxLabelStyle:t})=>ye(e,t)}
|
|
1774
1782
|
background-color: ${({checked:e,backgroundColor:t,disabledColor:o,theme:r})=>e&&t?t:e&&!t?r.primary["primary-1"]:!e&&o?o:e||o?void 0:r.neutral["neutral-2"]};
|
|
@@ -1788,20 +1796,20 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1788
1796
|
// custom styles
|
|
1789
1797
|
${({customSwitchStyle:e})=>e}
|
|
1790
1798
|
}
|
|
1791
|
-
`,
|
|
1799
|
+
`,Go=s.input.attrs({type:"checkbox"})`
|
|
1792
1800
|
opacity: 0;
|
|
1793
1801
|
z-index: 1;
|
|
1794
1802
|
border-radius: 31px;
|
|
1795
1803
|
width: 45px;
|
|
1796
1804
|
height: 22px;
|
|
1797
1805
|
cursor: pointer;
|
|
1798
|
-
`,
|
|
1806
|
+
`,Xo=s.span`
|
|
1799
1807
|
//Set the styles from the default styles object
|
|
1800
1808
|
${({inBuiltCss:e,defaultOptionTextStyle:t})=>ye(e,t)}
|
|
1801
1809
|
|
|
1802
1810
|
// custom styles
|
|
1803
1811
|
${({optionStyle:e})=>e}
|
|
1804
|
-
`,
|
|
1812
|
+
`,Oo=({checked:e,customSwitchStyle:o,customToggleBoxStyle:r,backgroundColor:l,disabledColor:i,switchColor:n,onClick:a,trueLabel:c,falseLabel:s,optionStyle:p,id:m,...u})=>{const g=d()||M;return t.createElement(jo,w({inBuiltCss:W,defaultCheckBoxWrapperStyle:"toggle-switch-wrapper"},u),t.createElement(Go,w({},u,{id:"checkbox",inBuiltCss:W,defaultCheckBoxStyle:"toggle-switch-checkbox",onClick:()=>{a(!e)},isChecked:e})),t.createElement(Fo,w({},u,{htmlFor:"checkbox",customToggleBoxStyle:r,customSwitchStyle:o,disabledColor:i,backgroundColor:l,switchColor:n,inBuiltCss:W,defaultCheckBoxLabelStyle:"toggle-switch-checkbox-label",checked:e,theme:g})),t.createElement(Xo,w({optionStyle:p,inBuiltCss:W,defaultOptionTextStyle:"toggle-switch-option-text"},u),e?c:s))};Oo.propTypes={customToggleBoxStyle:e.object,customSwitchStyle:e.object,backgroundColor:e.string,checked:e.bool,trueLabel:e.string,falseLabel:e.string,id:e.string},Oo.defaultProps={checked:!1,trueLabel:"Yes",falseLabel:"No",customSwitchStyle:{},customToggleBoxStyle:{},id:""};const Zo=s.div`
|
|
1805
1813
|
box-sizing: border-box;
|
|
1806
1814
|
display: flex;
|
|
1807
1815
|
justify-content: center;
|
|
@@ -1809,8 +1817,8 @@ ${({customInputColorStyle:e})=>e}
|
|
|
1809
1817
|
width: auto;
|
|
1810
1818
|
|
|
1811
1819
|
${({size:e})=>p`height: ${e}px;`}
|
|
1812
|
-
`,
|
|
1813
|
-
`,
|
|
1820
|
+
`,Jo=s.div`
|
|
1821
|
+
`,Uo=s.div`
|
|
1814
1822
|
box-sizing: border-box;
|
|
1815
1823
|
display: flex;
|
|
1816
1824
|
justify-content: center;
|
|
@@ -1839,18 +1847,11 @@ svg {
|
|
|
1839
1847
|
`}
|
|
1840
1848
|
}
|
|
1841
1849
|
}
|
|
1842
|
-
`,
|
|
1850
|
+
`,Qo=({theme:e,toggleSet:o,slide:r,color:l,size:i,transform:n,ratingValue:a,starVal:c,hover:s,...d})=>t.createElement(Uo,w({theme:e,ratingValue:a,starVal:c,hover:s,toggleSet:o,color:l,size:i,transform:n},d),t.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",id:"star_filled","data-name":"star filled",xmlns:"http://www.w3.org/2000/svg"},t.createElement("defs",null,t.createElement("clipPath",{id:"starFilled"},t.createElement("path",{id:"Star",d:"M10,15,4.122,18.09l1.123-6.545L.489,6.91l6.572-.955L10,0l2.939,5.955,6.572.955-4.755,4.635,1.123,6.545Z",transform:"translate(2 3)",stroke:"#000",strokeMiterlimit:"10",strokeWidth:"1.5"}))),t.createElement("rect",{x:"0",y:"0",fill:"rgb(217,217,217)",width:"100%",height:"100%",clipPath:"url(#starFilled)"}),t.createElement("rect",{x:r,y:"0",fill:l,width:"100%",height:"100%",clipPath:"url(#starFilled)"})));function Ko(e,t){let o=5*e/t;const r=[],l=o;for(let e=0;e<5;e++){if(o-1>=0)r.push("0");else if(o-1<0&&o-1>-1){const e=(24*o-24).toString();r.push(e)}else r.push("-24");o-=1}return{array:r,value:l}}function No(e,t){return 100*e/t}const Yo=({type:e,customStylesContainer:o,customStylesStar:r,customStylesPercentage:n,color:a,size:c,handleClick:s,transform:p,maxRange:m,value:u,toggleStar:g,toggleSet:b,identifier:f,...h})=>{d();const[y,x]=l(void 0),[A,v]=l(void 0),[C,S]=l(void 0),[E,k]=l(void 0);i((()=>{x(Ko(u,m).array),v(Ko(u,m).value),S(No(u,m))}),[u,m]),i((()=>{E?x(Ko(E,m).array):(x(Ko(u,m).array),v(Ko(u,m).value),S(No(u,m)))}),[E]);const z=t.createElement(t.Fragment,null,y?.map(((e,o)=>{const l=20*(o+1);return t.createElement(Qo,{ratingValue:l,starVal:A,hover:E,toggleSet:b,onClick:b?()=>s(l):null,onMouseEnter:b?()=>{k(l)}:null,onMouseLeave:b?()=>{k(null)}:null,slide:e,color:a,className:"star",size:c,transform:p,key:f?.concat(o),customStyles:r})})));return t.createElement(Zo,w({customStyles:o,type:e,size:c},h,{className:"container"}),g?z:t.createElement(Jo,{type:e,customStyles:n},C,"%"))};Yo.propTypes={customStylesContainer:e.object,customStylesStar:e.object,customStylesPercentage:e.object,type:e.string,color:e.string,size:e.number,transform:e.object,handleClick:e.func,maxRange:e.number,value:e.number,toggleStar:e.bool,toggleSet:e.bool,identifier:e.string},Yo.defaultProps={customStylesContainer:null,customStylesStar:null,customStylesPercentage:null,type:"star",maxRange:100,value:0,identifier:"ratingKey",toggleStar:!0,toggleSet:!1,color:"#F7B001"};const Do=s.div`
|
|
1843
1851
|
.form-check-input {
|
|
1844
1852
|
accent-color: ${({theme:e})=>e.primary["primary-1"]};
|
|
1845
1853
|
}
|
|
1846
|
-
|
|
1847
|
-
width: 40vw;
|
|
1848
|
-
display: flex;
|
|
1849
|
-
justify-content: center;
|
|
1850
|
-
flex-direction: column;
|
|
1851
|
-
gap: 20px;
|
|
1852
|
-
${({customStyles:e})=>e}
|
|
1853
|
-
`,$o=({customStyles:e})=>t.createElement(Do,{customStyles:e}),_o=({title:e,subtitle:o,wrapperStyle:r,imgLink:l,imgStyle:i,iconSize:n})=>{const a=d()||M,c={fontSize:"26px",fontWeight:"bold",color:`${a.textColor}`,lineHeight:"36px",display:"flex",gap:"14px",alignItems:"flex-start",paddingLeft:"25px"},s={fontSize:"13px",color:`${a.neutral["neutral-2"]}`,lineHeight:"24px",paddingLeft:"25px"};return t.createElement("div",{style:r},t.createElement("div",{style:c},l?t.createElement("img",{src:l,alt:"userIcon",srcset:"",style:i}):t.createElement(X,{icon:"user-icon",size:n,color:a.primary["primary-1"]})," ",t.createElement("h4",null,e)),t.createElement("div",{style:s},t.createElement("p",null,o)))};_o.propTypes={size:e.number},_o.defaultProps={iconSize:23};const er=({formData:e,customStyles:o,...r})=>{const l=e=>{switch(e.type){case"header":return(e=>t.createElement(a,null,t.createElement(mt,w({},e,r),e.children),e))(e);case"label":return(e=>t.createElement(gt,w({style:{marginBottom:"7px",paddingBottom:"0"}},e,r)))(e);case"text":return(e=>t.createElement(bo,w({},e,r)))(e);case"textArea":return(e=>t.createElement(Vo,w({},e,r)))(e);case"number":return(e=>t.createElement($t,w({},e,r)))(e);case"radio":return(e=>t.createElement(so,w({key:101*Math.random()|0},e,r)))(e);case"checkBox":return(e=>t.createElement(At,w({},e,r)))(e);case"singleSelect":return(e=>t.createElement(qt,w({dropdownType:"singleSelect"},e,r)))(e);case"multiSelect":return(e=>t.createElement(qt,w({dropdownType:"multiSelect"},e,r)))(e);case"asyncSingleSelect":return(e=>t.createElement(qt,w({dropdownType:"asyncSingleSelect"},e,r)))(e);case"asyncMultiSelect":return(e=>t.createElement(qt,w({dropdownType:"asyncMultiSelect"},e,r)))(e);case"signature":return(e=>t.createElement(wo,w({},e,r)))(e);case"fileUpload":return(e=>t.createElement(Ut,w({},e,r)))(e);case"date":return(e=>t.createElement(Wt,w({},e,r)))(e);case"toggle":return(e=>t.createElement(Go,w({},e,r)))(e);case"rating":return(e=>t.createElement(Ko,w({},e,r)))(e);case"buttonPrimary":return(e=>t.createElement(ke,w({},e,r)))(e);case"buttonSecondary":return(e=>t.createElement(Me,w({},e,r)))(e);case"buttonTiny":return(e=>t.createElement(Ie,w({},e,r)))(e);case"search":return(e=>t.createElement(fo,w({},e,r)))(e);case"table":return(e=>t.createElement(Yo,w({},e,r)))(e);case"passwordInput":return(e=>t.createElement(ro,w({},e,r)))(e);case"headerComponent":return(e=>t.createElement(_o,w({},e,r)))(e)}};return t.createElement(a,null,t.createElement(Ue,{defaultThemeColor:M},t.createElement($o,{onSubmit:()=>{console.log("form submit")},customStyles:o},e.map(((e,o)=>e.length>1?t.createElement(Ke,null,e.map(((o,r)=>t.createElement(Ne,{cols:e.length},l(o))))):l(e[0]))))))},tr=({formData:e,onSubmit:o,onReset:r,style:l,...i})=>{const n=e=>{switch(e.type){case"submit":return(e=>t.createElement(ke,{block:e.block,style:e.style,disabled:e.disabled,type:"submit",children:e.children,onClick:()=>{e.onClick()}}))(e);case"reset":case"cancel":return(e=>t.createElement(Me,{block:e.block,disabled:i.disabled,children:e.children,onClick:()=>{e.onClick()}}))(e)}};return t.createElement(a,null,t.createElement(Qe,{style:l},e&&e.map(((e,t)=>e.map(((e,t)=>n(e)))))))};const or=u`
|
|
1854
|
+
`,$o=({customStyles:e,inBuiltCss:o,type:r="table",sortIcon:l,data:i,tableColumns:n,progressPending:a,defaultSortFieldId:c,handleOnSort:s,sortServer:p,progressComponent:m,responsive:u,conditionalRowStyles:g,fixedHeader:b,fixedHeaderScrollHeight:f,checkboxColor:h,...y})=>{let x={};if(o&&o[r]&&(x=o[r]),e)for(const t in e)x[t]=e[t];const v=d()||M,C=t.forwardRef((({onClick:e,...o},r)=>t.createElement(Do,{theme:v},t.createElement("input",w({type:"checkbox",className:"form-check-input",ref:r,onClick:e},o)))));return t.createElement(A,w({responsive:u,data:i,columns:n,noHeader:!0,highlightOnHover:!0,sortIcon:l,progressPending:a,customStyles:x,defaultSortFieldId:c,progressComponent:m||void 0,sortServer:p,onSort:(e,t,o)=>{s(e,t,o)},conditionalRowStyles:g,fixedHeader:b,fixedHeaderScrollHeight:f,selectableRowsComponent:C},y))};$o.propTypes={inBuiltCss:e.object,sortIcon:e.any,data:e.array,tableColumns:e.array,progressPending:e.bool,progressComponent:e.any,defaultSortFieldId:e.number,sortServer:e.bool,handleOnSort:e.any,responsive:e.bool,conditionalRowStyles:e.array,fixedHeader:e.bool,fixedHeaderScrollHeight:e.string,customStyle:e.object},$o.defaultProps={inBuiltCss:W,sortIcon:t.createElement(X,{icon:"arrow-down",size:11,color:"#333333",style:{transform:"scaleX(0.7) scaleY(0.7) translate(5px, -3px)"}}),data:[],tableColumns:[],progressPending:!1,defaultSortFieldId:null,handleOnSort:(e,t,o)=>{console.log(e,t,o)},sortServer:null,progressComponent:void 0,responsive:!0,fixedHeader:!0,fixedHeaderScrollHeight:"100vh"};const _o=({title:e,subtitle:o,wrapperStyle:r,imgLink:l,imgStyle:i,iconSize:n})=>{const a=d()||M,c={fontSize:"26px",fontWeight:"bold",color:`${a.textColor}`,lineHeight:"36px",display:"flex",gap:"14px",alignItems:"flex-start",paddingLeft:"25px"},s={fontSize:"13px",color:`${a.neutral["neutral-2"]}`,lineHeight:"24px",paddingLeft:"25px"};return t.createElement("div",{style:r},t.createElement("div",{style:c},l?t.createElement("img",{src:l,alt:"userIcon",srcset:"",style:i}):t.createElement(X,{icon:"user-icon",size:n,color:a.primary["primary-1"]})," ",t.createElement("h4",null,e)),t.createElement("div",{style:s},t.createElement("p",null,o)))};_o.propTypes={size:e.number},_o.defaultProps={iconSize:23};const er=({formData:e,customStyles:o,...r})=>{const l=e=>{switch(e.type){case"header":return(e=>t.createElement(a,null,t.createElement(gt,w({},e,r),e.children),e))(e);case"label":return(e=>t.createElement(ft,w({style:{marginBottom:"7px",paddingBottom:"0"}},e,r)))(e);case"text":return(e=>t.createElement(ho,w({},e,r)))(e);case"textArea":return(e=>t.createElement(Bo,w({},e,r)))(e);case"number":return(e=>t.createElement(eo,w({},e,r)))(e);case"radio":return(e=>t.createElement(mo,w({key:101*Math.random()|0},e,r)))(e);case"checkBox":return(e=>t.createElement(Ct,w({},e,r)))(e);case"singleSelect":return(e=>t.createElement(Tt,w({dropdownType:"singleSelect"},e,r)))(e);case"multiSelect":return(e=>t.createElement(Tt,w({dropdownType:"multiSelect"},e,r)))(e);case"asyncSingleSelect":return(e=>t.createElement(Tt,w({dropdownType:"asyncSingleSelect"},e,r)))(e);case"asyncMultiSelect":return(e=>t.createElement(Tt,w({dropdownType:"asyncMultiSelect"},e,r)))(e);case"signature":return(e=>t.createElement(Eo,w({},e,r)))(e);case"fileUpload":return(e=>t.createElement(Kt,w({},e,r)))(e);case"date":return(e=>t.createElement(Pt,w({},e,r)))(e);case"toggle":return(e=>t.createElement(Oo,w({},e,r)))(e);case"rating":return(e=>t.createElement(Yo,w({},e,r)))(e);case"buttonPrimary":return(e=>t.createElement(ke,w({},e,r)))(e);case"buttonSecondary":return(e=>t.createElement(Me,w({},e,r)))(e);case"buttonTiny":return(e=>t.createElement(Ie,w({},e,r)))(e);case"search":return(e=>t.createElement(yo,w({},e,r)))(e);case"table":return(e=>t.createElement($o,w({},e,r)))(e);case"passwordInput":return(e=>t.createElement(io,w({},e,r)))(e);case"headerComponent":return(e=>t.createElement(_o,w({},e,r)))(e)}};return t.createElement(a,null,t.createElement(Ue,{defaultThemeColor:M},t.createElement(De,{onSubmit:()=>{console.log("form submit")},customStyles:o},e.map(((e,o)=>e.length>1?t.createElement(Ke,null,e.map(((o,r)=>t.createElement(Ne,{cols:e.length},l(o))))):l(e[0]))))))},tr=({formData:e,onSubmit:o,onReset:r,style:l,...i})=>{const n=e=>{switch(e.type){case"submit":return(e=>t.createElement(ke,{block:e.block,style:e.style,disabled:e.disabled,type:"submit",children:e.children,onClick:()=>{e.onClick()}}))(e);case"reset":case"cancel":return(e=>t.createElement(Me,{block:e.block,disabled:i.disabled,children:e.children,onClick:()=>{e.onClick()}}))(e)}};return t.createElement(a,null,t.createElement(Qe,{style:l},e&&e.map(((e,t)=>e.map(((e,t)=>n(e)))))))};const or=u`
|
|
1854
1855
|
@font-face {
|
|
1855
1856
|
font-family: "Averta";
|
|
1856
1857
|
font-weight: 100;
|
|
@@ -2192,7 +2193,7 @@ ${({theme:e,type:t,customStyles:o})=>{if(e){let r={};if(e[t]){for(const t in e.c
|
|
|
2192
2193
|
${({progressBarStyle:e})=>e}
|
|
2193
2194
|
width: ${({now:e})=>e+"%"};
|
|
2194
2195
|
background-color: ${({color:e,theme:t})=>e||t.primary["primary-1"]};
|
|
2195
|
-
`,Xr=({labelStyle:e,progressBarStyle:o,label:r,now:l,color:i,...n})=>{const a=d()||M;return t.createElement("div",null,t.createElement(
|
|
2196
|
+
`,Xr=({labelStyle:e,progressBarStyle:o,label:r,now:l,color:i,...n})=>{const a=d()||M;return t.createElement("div",null,t.createElement(ft,w({inBuiltCss:W,customStyles:e,type:"progressbarLabel",text:r},n)),t.createElement(Fr,w({progressBarStyle:o,theme:a,color:i},n),t.createElement(Gr,w({progressBarStyle:o,now:l,theme:a,color:i},n))))};Xr.propTypes={labelStyle:e.object,progressBarStyle:e.object,color:e.string,label:e.string,now:e.number},Xr.defaultProps={labelStyle:{},progressBarStyle:{},label:"",now:0};const Or=s.div`
|
|
2196
2197
|
background: transparent;
|
|
2197
2198
|
display: flex;
|
|
2198
2199
|
align-items: center;
|
|
@@ -2501,4 +2502,4 @@ overflow: hidden;
|
|
|
2501
2502
|
// background: ${({theme:e,bg:t})=>t?e.variant[t]:e.bgColor};
|
|
2502
2503
|
font-size: ${({size:e})=>kl[e].fontSize};
|
|
2503
2504
|
line-height: ${({size:e})=>kl[e].lineHeight};
|
|
2504
|
-
`,Vl=({size:e,children:o,bg:r,text:l,...i})=>{const n=d()||M;return t.createElement(zl,w({theme:n,bg:r,text:l,size:e},i),t.createElement(or,{theme:n}),o)};Vl.propTypes={size:e.oneOf(["xs","sm","md","lg"]),text:e.string,bg:e.string,children:e.any,theme:e.object},Vl.defaultProps={size:"md"};export{Z as Accordion,J as AccordionSB,U as AccordionSBfooter,Xe as ActionContainer,Je as ActionItem,Y as ArrowBar,oe as Avatar,ne as AvatarSB,de as AvatarSBfooter,ue as Banner,he as Breadcrumb,sr as ButtonPopup,I as Card,P as CardRef,
|
|
2505
|
+
`,Vl=({size:e,children:o,bg:r,text:l,...i})=>{const n=d()||M;return t.createElement(zl,w({theme:n,bg:r,text:l,size:e},i),t.createElement(or,{theme:n}),o)};Vl.propTypes={size:e.oneOf(["xs","sm","md","lg"]),text:e.string,bg:e.string,children:e.any,theme:e.object},Vl.defaultProps={size:"md"};export{Z as Accordion,J as AccordionSB,U as AccordionSBfooter,Xe as ActionContainer,Je as ActionItem,Y as ArrowBar,oe as Avatar,ne as AvatarSB,de as AvatarSBfooter,ue as Banner,he as Breadcrumb,sr as ButtonPopup,I as Card,P as CardRef,Ct as CheckBoxInput,Et as ColorInput,Re as Content,Nr as DarkSecondaryLink,Pt as DateSelect,_e as Divider,j as DocumentCard,tt as Drawer,Tt as DropdownSelect,Kt as DropzoneInput,ot as ErrorBoundary,it as FilterChip,at as Footer,mt as FooterContent,er as FormComponent,Ue as FormContainer,De as FormWrapper,ir as GroupAvatars,ur as GroupButtons,hr as GroupButtonsPopup,wr as GroupStatusCircle,gt as Header,_o as HeaderComponent,kr as HyperLink,X as Icon,$ as Image,ft as Label,Dr as LightSecondaryLink,Ce as Loader,Pr as ModalComp,Ne as MultiColumnDiv,Ke as MultiColumnWrapper,rl as Navbar,eo as NumericInput,qr as Overlay,Oe as OverlayOptionContainer,Ze as OverlayOptionItemLabel,Pe as PageContent,Tr as Pagination,io as PasswordInput,ke as PrimaryButton,sl as PrimaryStatusChip,Xr as ProgressBar,Qr as ProgressSteps,mo as RadioInput,Yo as Rating,yo as SearchInput,Me as SecondaryButton,ml as SecondaryStatusChip,nl as Sidebar,Eo as SignatureInput,bl as SlimPrimaryStatusChip,yl as SlimSecondaryStatusChip,xr as StatusCircle,He as StyledCentralBar,qe as StyledClearSearch,je as StyledCreateRow,Fe as StyledRow,Le as StyledRowSearch,Ge as StyledSearchRow,Te as StyledWarning,Qe as SubmitButtonContainer,tr as SubmitComponent,$o as Table,Bo as TextArea,ho as TextInput,To as TimeInput,Ie as TinyButton,Oo as ToggleSwitch,El as Tooltip,Vl as Typography,V as graphColor,xe as hexToRGB,k as neutralColor,S as primaryColor,z as shadeColor,E as uiColor};
|