dga-ui-react 1.8.18 → 1.8.20
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/cjs/index.js +282 -274
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +193 -185
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -921,7 +921,176 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
|
|
|
921
921
|
pointer-events: none;
|
|
922
922
|
color: ${e=>e.$theme.palette.neutral[300]};
|
|
923
923
|
}
|
|
924
|
-
`;var po="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD/SURBVHgB7dUxroJAEAbgAV5I6LaBUHqExxG8wWtf9Z4n8Ah6I49gbaU30JJAIQUVCeA/xsLCgl2zRpP/SzYLxSSTmZ1dESIiIiJ6IE3TZZZlK3lSKJ6M4xhgWyPJvTFmJu8IVfzHOiPJo2uSgXiW5/lsGIYtPg2qOq/r+mAT7z1BdZ9k13VF0zSnqbFfYkEPPrYfsdT3vQTBtRYmjmMdnMXUWKshuR18J4htxMFLWqwDgsppiyUMw3lZlqepsVYtdoFj8Y32blBBg1+r5JS3e1AhuT9s18pFUVTYTrBX+opgjXpR6xSLo0g8SZKkQGt3VVX9tm3rNCBEREREn+8C+TlJKy8I1/cAAAAASUVORK5CYII=",uo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEJSURBVHgB7dU9boNAEAXgtySigYKGn9JHSI7AEXIC5wi5QXKEtOlyhZwgbTp8g7gEUWQLQBEF+I1l916stWxpPmnFFFsMszO7gFJKKaXULbvDmbIse43j+LHv+x94EGChJElWTK5i+DbPc4JrckjuN03TP65neHQPR0zogZ9vLstVtm27gUfGZbNULgxDSQ5BEJR1XW/hmVOCrN6nMWbNcMO+s1iAP/bVNM37yfvhgMkdw4sNhVMFi6JYTdO0P+JxHEtr7RaeOVVQeo5H+ySx9KL0JDxzvgdlamVAJGaSFftyjWskx83kKt6Hc57nL/Bk8VPXdZ0dhuEjiiLOjvn39dQppZRSSt22HXZvSded5pbnAAAAAElFTkSuQmCC";const go=
|
|
924
|
+
`;var po="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD/SURBVHgB7dUxroJAEAbgAV5I6LaBUHqExxG8wWtf9Z4n8Ah6I49gbaU30JJAIQUVCeA/xsLCgl2zRpP/SzYLxSSTmZ1dESIiIiJ6IE3TZZZlK3lSKJ6M4xhgWyPJvTFmJu8IVfzHOiPJo2uSgXiW5/lsGIYtPg2qOq/r+mAT7z1BdZ9k13VF0zSnqbFfYkEPPrYfsdT3vQTBtRYmjmMdnMXUWKshuR18J4htxMFLWqwDgsppiyUMw3lZlqepsVYtdoFj8Y32blBBg1+r5JS3e1AhuT9s18pFUVTYTrBX+opgjXpR6xSLo0g8SZKkQGt3VVX9tm3rNCBEREREn+8C+TlJKy8I1/cAAAAASUVORK5CYII=",uo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEJSURBVHgB7dU9boNAEAXgtySigYKGn9JHSI7AEXIC5wi5QXKEtOlyhZwgbTp8g7gEUWQLQBEF+I1l916stWxpPmnFFFsMszO7gFJKKaXULbvDmbIse43j+LHv+x94EGChJElWTK5i+DbPc4JrckjuN03TP65neHQPR0zogZ9vLstVtm27gUfGZbNULgxDSQ5BEJR1XW/hmVOCrN6nMWbNcMO+s1iAP/bVNM37yfvhgMkdw4sNhVMFi6JYTdO0P+JxHEtr7RaeOVVQeo5H+ySx9KL0JDxzvgdlamVAJGaSFftyjWskx83kKt6Hc57nL/Bk8VPXdZ0dhuEjiiLOjvn39dQppZRSSt22HXZvSded5pbnAAAAAElFTkSuQmCC";const go={medium:{w:320,h:32,p:16,f:14},large:{w:320,h:40,p:16,f:16}},ho=r=>{const i=b(),{state:n,error:a,filled:l,style:s,onChange:d,children:c,onOpen:p,className:u,dropdownStyle:g,label:h,placeholder:A,value:f,valueDisplay:x,multiple:y,name:w,size:C}=r,$=v(r,["state","error","filled","style","onChange","children","onOpen","className","dropdownStyle","label","placeholder","value","valueDisplay","multiple","name","size"]),[k,S]=o.useState(""),[B,E]=o.useState(!1),[N,I]=o.useState({top:0,left:0,width:0}),z=o.useRef(null),F=null!=C?C:"large",U=r.disabled||"disabled"===n;let R=i.textColor,D=i.palette.neutral[500],T=`1px solid ${a?i.palette.error[700]:i.palette.neutral[400]}`,O=`1px solid ${a?i.palette.error[700]:i.palette.neutral[700]}`,Q=`1px solid ${a?i.palette.error[700]:i.palette.neutral[700]}`,Y="#FFF",H=a?i.palette.error[700]:i.textColor,L=i.elevation.shadows.md;"filled"===s&&(Y=i.palette.neutral[50],T=`1px solid ${i.palette.neutral[300]}`),"filled-darker"===s&&(Y=i.palette.neutral[100],T=`1px solid ${i.palette.neutral[400]}`),"filled-lighter"===s&&(Y=i.palette.neutral[25],T=`1px solid ${i.palette.neutral[200]}`),l&&(Y=i.palette.neutral[50],T=`1px solid ${i.palette.neutral[300]}`),U&&(R=i.palette.neutral[400],T=`1px solid ${i.palette.neutral[200]}`,O=`1px solid ${i.palette.neutral[200]}`,Q=`1px solid ${i.palette.neutral[200]}`,Y=i.palette.neutral[50]),"read-only"===n&&(Y=i.palette.neutral[25],T=`1px solid ${i.palette.neutral[300]}`,O=`1px solid ${i.palette.neutral[300]}`,Q=`1px solid ${i.palette.neutral[300]}`),"hovered"===n&&(T=O),"focused"===n&&(T=Q,L=i.elevation.shadows.md),"pressed"===n&&(Y=i.palette.neutral[100],T=Q),a&&(T=`1px solid ${i.palette.error[700]}`,O=`1px solid ${i.palette.error[700]}`,Q=`1px solid ${i.palette.error[700]}`,H=i.palette.error[700]);const M=()=>{z.current&&I({top:z.current.offsetTop+z.current.clientHeight,left:z.current.offsetLeft,width:z.current.clientWidth})},j=(e,t)=>{if(y||null==d||d(e,t),y){let r=[];r=f&&Array.isArray(f)&&f.includes(t)?f.filter((e=>e!==t)):[...f||[],t],null==d||d(e,r)}},P=o.Children.map(c,(e=>{var t,r;if(e)return o.cloneElement(e,Object.assign(Object.assign({},e.props),{onClick:j,selected:(null===(t=e.props)||void 0===t?void 0:t.selected)||f===(null===(r=e.props)||void 0===r?void 0:r.value)||Array.isArray(f)&&f.includes(e.props.value),multiple:y}))}));return o.useEffect((()=>{let e="";y?(null==P||P.map((t=>{t.props.selected&&(e=e.concat(t.props.children+", "))})),e=e.slice(0,e.length-2)):null==P||P.map((t=>{t.props.selected&&(e=t.props.children)})),S(e)}),[P,f]),o.useEffect((()=>{if(z.current){const e=()=>{z.current&&M()},t=e=>{var t;(null===(t=z.current)||void 0===t?void 0:t.contains(e.target))||(!y||y&&e.target&&e.target.classList&&!e.target.classList.contains("dgaui_dropdownItem"))&&E(!1)};return window.addEventListener("resize",e),window.addEventListener("click",t),()=>{window.removeEventListener("resize",e),window.removeEventListener("click",t)}}}),[z]),o.useEffect((()=>{B&&M(),B&&p&&p()}),[B,p]),t(mo,Object.assign({style:g,$theme:i,className:m("dgaui dgaui_dropdown",u)},$,{children:[h&&e("label",{className:U?"disabled":"read-only"===n?"readonly":void 0,children:h}),t(Ao,{ref:z,onClick:()=>{"disabled"!==n&&"read-only"!==n&&E((e=>!e))},className:"dgaui_dropdownContainer "+(U?"disabled":"")+("read-only"===n?" readonly":""),$customStyle:{theme:i,direction:i.direction,minWidth:go[F].w,height:go[F].h,padding:go[F].p,fontSize:go[F].f,placeholderFontColor:D,fontColor:R,border:T,borderHovered:O,borderFocused:Q,backgroundColor:Y,shadowFocus:L},children:[A&&!x&&!k&&e("div",{className:"placeholder",children:A}),e("div",{className:"valueDisplay",children:x||k})]}),e("div",{className:"dgaui_dropdownItems"+(B?" slide-bottom":""),style:Object.assign({},N),children:P}),e(fo,{$bgColor:H,className:"dgaui_dropdownSeparator"+(B?" open":"")})]}))},mo=sr.div`
|
|
925
|
+
direction: ${e=>e.$theme.direction};
|
|
926
|
+
display: flex;
|
|
927
|
+
flex-direction: column;
|
|
928
|
+
color: ${e=>e.$theme.textColor};
|
|
929
|
+
width: 100%;
|
|
930
|
+
cursor: pointer;
|
|
931
|
+
|
|
932
|
+
label {
|
|
933
|
+
text-align: start;
|
|
934
|
+
margin-bottom: 8px;
|
|
935
|
+
&.disabled {
|
|
936
|
+
color: #9da4ae;
|
|
937
|
+
}
|
|
938
|
+
&.readonly {
|
|
939
|
+
color: ${e=>e.$theme.palette.neutral[600]};
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.dgaui_dropdownItems {
|
|
944
|
+
position: absolute;
|
|
945
|
+
top: 35px;
|
|
946
|
+
left: 0;
|
|
947
|
+
z-index: 1400;
|
|
948
|
+
background-color: #fff;
|
|
949
|
+
width: 100%;
|
|
950
|
+
opacity: 0;
|
|
951
|
+
max-height: 300px;
|
|
952
|
+
overflow-y: scroll;
|
|
953
|
+
pointer-events: none;
|
|
954
|
+
border: 1px solid ${e=>e.$theme.palette.neutral[300]};
|
|
955
|
+
border-radius: 4px;
|
|
956
|
+
padding: 8px;
|
|
957
|
+
box-sizing: border-box;
|
|
958
|
+
${e=>e.$theme.elevation.shadows.xl}
|
|
959
|
+
cursor: pointer;
|
|
960
|
+
|
|
961
|
+
&.slide-bottom {
|
|
962
|
+
animation: slide-bottom 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
|
|
963
|
+
pointer-events: all;
|
|
964
|
+
}
|
|
965
|
+
@keyframes slide-bottom {
|
|
966
|
+
0% {
|
|
967
|
+
transform: translateZ(0) translateY(0);
|
|
968
|
+
opacity: 0;
|
|
969
|
+
}
|
|
970
|
+
100% {
|
|
971
|
+
transform: translateZ(160px) translateY(8px);
|
|
972
|
+
opacity: 1;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
&:has(.dgaui_dropdownSeparator.open) {
|
|
978
|
+
.dgaui_dropdownContainer:before {
|
|
979
|
+
top: 20%;
|
|
980
|
+
transform: rotateZ(180deg);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
&:has(.dgaui_dropdownContainer:active) {
|
|
984
|
+
.dgaui_dropdownSeparator {
|
|
985
|
+
transform: scaleX(0.5) translateY(-2.5px);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
&:has(.dgaui_dropdownContainer:disabled) {
|
|
989
|
+
.dgaui_dropdownSeparator {
|
|
990
|
+
opacity: 0;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
.dgaui_checkboxContainer {
|
|
995
|
+
pointer-events: none;
|
|
996
|
+
}
|
|
997
|
+
`,Ao=sr.div`
|
|
998
|
+
box-sizing: border-box;
|
|
999
|
+
outline: none;
|
|
1000
|
+
direction: ${e=>e.$customStyle.direction};
|
|
1001
|
+
border-radius: 4px;
|
|
1002
|
+
width: 100%;
|
|
1003
|
+
height: ${e=>e.$customStyle.height}px;
|
|
1004
|
+
font-size: ${e=>e.$customStyle.fontSize}px;
|
|
1005
|
+
color: ${e=>e.$customStyle.fontColor};
|
|
1006
|
+
border: ${e=>e.$customStyle.border};
|
|
1007
|
+
background-color: ${e=>e.$customStyle.backgroundColor};
|
|
1008
|
+
padding: 0 ${e=>e.$customStyle.padding}px;
|
|
1009
|
+
position: relative;
|
|
1010
|
+
appearance: none;
|
|
1011
|
+
-webkit-appearance: none;
|
|
1012
|
+
-moz-appearance: none;
|
|
1013
|
+
&:-ms-expand {
|
|
1014
|
+
display: none; /* Hide the default arrow in Internet Explorer 10 and Internet Explorer 11 */
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
input {
|
|
1018
|
+
opacity: 0;
|
|
1019
|
+
width: 100%;
|
|
1020
|
+
height: 100%;
|
|
1021
|
+
cursor: pointer;
|
|
1022
|
+
position: absolute;
|
|
1023
|
+
top: 0;
|
|
1024
|
+
left: 0;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.valueDisplay {
|
|
1028
|
+
height: 100%;
|
|
1029
|
+
display: inline-block;
|
|
1030
|
+
white-space: nowrap;
|
|
1031
|
+
overflow: hidden;
|
|
1032
|
+
width: 80%;
|
|
1033
|
+
text-overflow: ellipsis;
|
|
1034
|
+
|
|
1035
|
+
/* vertical middle align */
|
|
1036
|
+
line-height: ${e=>e.$customStyle.height}px;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
.placeholder {
|
|
1040
|
+
height: 100%;
|
|
1041
|
+
width: 100%;
|
|
1042
|
+
display: flex;
|
|
1043
|
+
align-items: center;
|
|
1044
|
+
color: ${e=>e.$customStyle.theme.palette.neutral[400]};
|
|
1045
|
+
font-size: 16px;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
&:before {
|
|
1049
|
+
content: url(${pr});
|
|
1050
|
+
display: block;
|
|
1051
|
+
top: 30%;
|
|
1052
|
+
inset-inline-end: 8px;
|
|
1053
|
+
position: absolute;
|
|
1054
|
+
transition: all 0.1s;
|
|
1055
|
+
width: 20px;
|
|
1056
|
+
height: 20px;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
&:focus-within {
|
|
1060
|
+
${e=>e.$customStyle.shadowFocus};
|
|
1061
|
+
border: ${e=>e.$customStyle.borderFocused};
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
&:hover {
|
|
1065
|
+
border: ${e=>e.$customStyle.borderHovered};
|
|
1066
|
+
}
|
|
1067
|
+
&.disabled {
|
|
1068
|
+
pointer-events: none;
|
|
1069
|
+
&:before {
|
|
1070
|
+
content: url(${mr});
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
&.readonly {
|
|
1074
|
+
pointer-events: none;
|
|
1075
|
+
&:before {
|
|
1076
|
+
content: url(${mr});
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
`,fo=sr.span`
|
|
1080
|
+
height: 2px;
|
|
1081
|
+
background: ${e=>e.$bgColor};
|
|
1082
|
+
display: block;
|
|
1083
|
+
transform: scaleX(0) translateY(-2.5px);
|
|
1084
|
+
transform-origin: 50%;
|
|
1085
|
+
transition: all 0.2s;
|
|
1086
|
+
border-bottom-left-radius: 50px;
|
|
1087
|
+
border-bottom-right-radius: 50px;
|
|
1088
|
+
z-index: 1;
|
|
1089
|
+
|
|
1090
|
+
&.open {
|
|
1091
|
+
transform: scaleX(0.995) translateY(-2.5px);
|
|
1092
|
+
}
|
|
1093
|
+
`,bo=({hijri:r=!1,range:i=!1,minYear:n,maxYear:a,minDate:l,maxDate:s,onChange:c,onRangeChange:p,value:u,withTextInput:g=!0,textInputProps:h,closeOnSelect:m=!0,rangeSeparator:A=" - "})=>{const f=b(),[x,v]=o.useState(),[y,w]=o.useState(""),[C,$]=o.useState([]),[k,S]=o.useState(0),B=o.useRef(),E=i&&Array.isArray(x)&&1===x.length;o.useEffect((()=>{let e=0,t=0;r?(e=l?l.year:n||1300,t=s?s.year:a||1500):(e=l?l.year:n||1900,t=(s?s.year:a||2100)+1);let o=[];if(e>=t)return o=Array(200).fill(0).map(((e,t)=>t+1900)),void $(o);o=e&&t?Array(t-e).fill(0).map(((t,r)=>r+e)):e&&!t?Array(200).fill(0).map(((t,r)=>r+e)):!e&&t?Array(200).fill(0).map(((e,t)=>t+(r?1300:1900))):r?Array(200).fill(0).map(((e,t)=>t+1300)):Array(200).fill(0).map(((e,t)=>t+1900)),$(o)}),[n,a,l,s,r]),o.useEffect((()=>{const e=u&&Array.isArray(u)?u[0].year:u&&!Array.isArray(u)?u.year:(new Date).getFullYear(),t=(new Date).getMonth()+1;S(r?function(e,t){let r=(e-622)/.970224;t>=9&&(r+=1);return Math.floor(r)}(e,t):e)}),[r]),o.useEffect((()=>{i||v(void 0)}),[i]),o.useEffect((()=>{v(u)}),[u]),o.useEffect((()=>{let e="";i&&Array.isArray(x)&&2===x.length?e=`${yo(x[0])}${A}${yo(x[1])}`:x&&!Array.isArray(x)&&(e=yo(x)),w(e)}),[x,i]),o.useEffect((()=>{!u&&l&&l.year>(new Date).getFullYear()&&setTimeout((()=>{var e,t;null===(e=null==B?void 0:B.current)||void 0===e||e.set("year",n||(null==l?void 0:l.year)),null===(t=null==B?void 0:B.current)||void 0===t||t.set("month",n||(null==l?void 0:l.month))}),200),!u&&n&&n>(new Date).getFullYear()&&setTimeout((()=>{var e;null===(e=null==B?void 0:B.current)||void 0===e||e.set("year",n||(null==l?void 0:l.year))}),200)}),[l,n]);const N=e(d,{ref:B,value:u||x,range:i,calendar:r?eo:qr,onMonthChange:e=>S(e.year),locale:r?ro:"rtl"===f.direction?to:void 0,weekStartDayIndex:r?1:0,weekDays:r?["سبت","أحد","إثنين","ثلاثاء","أربعاء","خميس","جمعة"]:"rtl"===f.direction?["أحد","إثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"]:void 0,onChange:e=>{v(e),i&&p&&Array.isArray(e)?p(e):e&&c&&c(e),m&&(i&&Array.isArray(e)&&e.length>1?document.body.click():i||document.body.click())},format:"YYYY/MM/DD",showOtherDays:!0,monthYearSeparator:" ",minDate:l,maxDate:s,children:e("div",{className:"yearsSelect",children:e(ho,{value:k,onChange:(e,t)=>(e=>{var t;v(void 0),null===(t=null==B?void 0:B.current)||void 0===t||t.set("year",e),S(e)})(+t),children:C.map((t=>e(Cr,{value:t,style:{minWidth:200},children:t},t)))})})});return t(xo,{className:"dgaui_datePicker"+(E?" rangeOnlyOneSelected":""),$theme:f,children:[!g&&N,g&&e(so,{menuItems:N,keepOpenOnItemsClicked:!0,disabled:null==h?void 0:h.disabled,children:e(io,Object.assign({value:(null==h?void 0:h.value)||y,readOnly:!0},h))})]})},xo=sr.div`
|
|
925
1094
|
.rmdp-top-class {
|
|
926
1095
|
width: 424px;
|
|
927
1096
|
display: block !important;
|
|
@@ -1166,14 +1335,6 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
|
|
|
1166
1335
|
z-index: 0;
|
|
1167
1336
|
display: flex;
|
|
1168
1337
|
justify-content: flex-start;
|
|
1169
|
-
|
|
1170
|
-
select {
|
|
1171
|
-
outline: none;
|
|
1172
|
-
border: none;
|
|
1173
|
-
margin-top: 6px;
|
|
1174
|
-
font-size: 16px;
|
|
1175
|
-
font-weight: 500;
|
|
1176
|
-
}
|
|
1177
1338
|
}
|
|
1178
1339
|
|
|
1179
1340
|
.rmdp-rtl {
|
|
@@ -1241,7 +1402,24 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
|
|
|
1241
1402
|
.dgaui_menu {
|
|
1242
1403
|
display: block;
|
|
1243
1404
|
}
|
|
1244
|
-
|
|
1405
|
+
|
|
1406
|
+
.dgaui_dropdown {
|
|
1407
|
+
min-width: 85px;
|
|
1408
|
+
justify-content: center;
|
|
1409
|
+
.dgaui_dropdownContainer {
|
|
1410
|
+
border: none;
|
|
1411
|
+
text-align: start;
|
|
1412
|
+
}
|
|
1413
|
+
.dgaui_dropdownItems {
|
|
1414
|
+
.dgaui_dropdownItem {
|
|
1415
|
+
&::after {
|
|
1416
|
+
inset-inline-end: 0;
|
|
1417
|
+
top: 8px;
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
`;const vo=e=>null==e?void 0:e.toString().padStart(2,"0"),yo=e=>`${vo(e.day)}/${vo(e.month.number)}/${e.year}`,wo=()=>t("svg",{className:"elementsIcon",width:"20",height:"22",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.9998 0.250854C14.1608 0.250854 15.903 0.250854 17.23 1.18585C17.611 1.45385 17.95 1.77385 18.24 2.13685C19.251 3.40785 19.251 5.03485 19.251 8.27385V10.8189C19.251 13.8738 19.251 15.4069 18.729 16.7229C17.895 18.8279 16.139 20.4849 13.911 21.2669C12.7097 21.6876 11.3248 21.7418 8.85332 21.7488C8.841 21.7499 8.82868 21.7509 8.81633 21.7518C8.80186 21.753 8.78781 21.7518 8.77406 21.749C8.43151 21.7499 8.0683 21.7499 7.68208 21.7499C5.80016 21.7499 4.85498 21.7499 4.01699 21.4559C2.65599 20.9779 1.582 19.9639 1.071 18.6749C0.75 17.8659 0.75 16.9689 0.75 15.1829V10.6703C0.75 10.2563 1.086 9.92028 1.5 9.92028C1.914 9.92028 2.25 10.2563 2.25 10.6703V15.1828C2.25 16.7787 2.25 17.5799 2.46499 18.1229C2.81599 19.0079 3.56301 19.7079 4.51301 20.0419C5.11001 20.2519 5.96899 20.2519 7.68096 20.2519C8.0634 20.2519 8.42207 20.2519 8.75907 20.2511C10.0619 20.1207 11.083 19.0176 11.083 17.681C11.083 17.5211 11.075 17.3488 11.0666 17.1666L11.0647 17.1261C11.0398 16.5815 11.0115 15.9649 11.165 15.389C11.388 14.557 12.043 13.902 12.875 13.679C13.4506 13.5256 14.0659 13.5537 14.6112 13.5787L14.6511 13.5805C14.8339 13.589 15.0067 13.597 15.167 13.597C16.5666 13.597 17.7102 12.4773 17.749 11.0869C17.749 10.9993 17.749 10.9104 17.749 10.82V8.27485C17.749 5.38385 17.749 3.93285 17.064 3.07185C16.864 2.82085 16.629 2.59885 16.364 2.41385C15.465 1.78085 13.9868 1.75286 10.9978 1.75286C10.5838 1.75286 10.2478 1.41686 10.2478 1.00286C10.2478 0.588855 10.5838 0.252855 10.9978 0.252855L10.9998 0.250854ZM17.6944 14.2184C16.9986 14.7683 16.1204 15.097 15.167 15.097C14.9762 15.097 14.7811 15.0883 14.5905 15.0799C14.5763 15.0792 14.5621 15.0786 14.548 15.078L14.5321 15.0772C14.0781 15.0565 13.6109 15.0351 13.263 15.129C12.948 15.213 12.699 15.462 12.615 15.777C12.5212 16.1291 12.5429 16.6017 12.5638 17.0587L12.564 17.062C12.574 17.266 12.583 17.476 12.583 17.681C12.583 18.617 12.2663 19.4805 11.7344 20.17C12.4126 20.1131 12.9462 20.0165 13.413 19.8529C15.23 19.2149 16.659 17.8729 17.333 16.1719C17.5375 15.6556 17.6415 15.0456 17.6944 14.2184Z",fill:"#161616"}),e("path",{d:"M3.58933 3.36016C3.39711 3.60489 3.19487 3.86201 3.03781 4.0236C2.74911 4.32062 2.27428 4.32737 1.97726 4.03867C1.68023 3.74996 1.67349 3.27514 1.96219 2.97811C2.05089 2.88685 2.19651 2.70504 2.40971 2.43362L2.45675 2.37369C2.64683 2.13155 2.8698 1.84749 3.09954 1.57636C3.34574 1.28581 3.62131 0.984013 3.89679 0.749391C4.03484 0.631816 4.19043 0.515847 4.35782 0.426268C4.51926 0.339874 4.74172 0.250854 5 0.250854C5.25829 0.250854 5.48074 0.339874 5.64218 0.426268C5.80957 0.515847 5.96517 0.631816 6.10321 0.749391C6.37869 0.984012 6.65426 1.28581 6.90047 1.57636C7.1302 1.84748 7.35317 2.13154 7.54324 2.37368L7.59029 2.43362C7.80349 2.70504 7.94911 2.88685 8.03781 2.97811C8.32651 3.27514 8.31977 3.74996 8.02274 4.03867C7.72572 4.32737 7.25089 4.32062 6.96219 4.0236C6.80513 3.86201 6.6029 3.60489 6.41067 3.36016L6.36595 3.30321C6.17304 3.05748 5.96675 2.79471 5.75606 2.54607L5.75 2.53893V9.00085C5.75 9.41507 5.41421 9.75085 5 9.75085C4.58579 9.75085 4.25 9.41507 4.25 9.00085V2.53893L4.24394 2.54607C4.03326 2.7947 3.82698 3.05746 3.63408 3.30318L3.58933 3.36016Z",fill:"#161616"})]});const Co=({status:r,filename:o,helperText:i,onDelete:n,theme:a})=>t($o,{className:"dgaui dgaui_fileCard "+("error"===r?"error":""),$theme:a,children:[t("div",{className:"dgaui_fileCardContent",children:[t("div",{className:"dgaui_fileCardFileName",children:["loading"===r&&e("span",{className:"dgaui_loader dgaui_fileCardIcon"}),"success"===r&&e("img",{className:"dgaui_fileCardIcon",src:"data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.0002 19.1667C15.0628 19.1667 19.1668 15.0626 19.1668 10C19.1668 4.93743 15.0628 0.833374 10.0002 0.833374C4.93755 0.833374 0.833496 4.93743 0.833496 10C0.833496 15.0626 4.93755 19.1667 10.0002 19.1667Z' fill='white'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.0002 19.1667C15.0628 19.1667 19.1668 15.0626 19.1668 10C19.1668 4.93743 15.0628 0.833374 10.0002 0.833374C4.93755 0.833374 0.833496 4.93743 0.833496 10C0.833496 15.0626 4.93755 19.1667 10.0002 19.1667ZM5.87534 9.26781C5.54991 9.59324 5.54991 10.1209 5.87534 10.4463L8.23237 12.8033C8.5578 13.1288 9.08544 13.1288 9.41088 12.8033L14.1249 8.0893C14.4504 7.76386 14.4504 7.23622 14.1249 6.91078C13.7995 6.58535 13.2718 6.58535 12.9464 6.91078L8.82162 11.0356L7.05385 9.26781C6.72842 8.94237 6.20078 8.94237 5.87534 9.26781Z' fill='%23067647'/%3e%3c/svg%3e"}),"error"===r&&e("img",{className:"dgaui_fileCardIcon",src:"data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.0002 19.1666C15.0628 19.1666 19.1668 15.0626 19.1668 9.99998C19.1668 4.93737 15.0628 0.833313 10.0002 0.833313C4.93755 0.833313 0.833496 4.93737 0.833496 9.99998C0.833496 15.0626 4.93755 19.1666 10.0002 19.1666Z' fill='white'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.0002 19.1666C15.0628 19.1666 19.1668 15.0626 19.1668 9.99998C19.1668 4.93737 15.0628 0.833313 10.0002 0.833313C4.93755 0.833313 0.833496 4.93737 0.833496 9.99998C0.833496 15.0626 4.93755 19.1666 10.0002 19.1666ZM10.0002 5.83331C9.53992 5.83331 9.16683 6.20641 9.16683 6.66665V9.99998C9.16683 10.4602 9.53992 10.8333 10.0002 10.8333C10.4604 10.8333 10.8335 10.4602 10.8335 9.99998V6.66665C10.8335 6.20641 10.4604 5.83331 10.0002 5.83331ZM10.0002 12.5C9.53992 12.5 9.16683 12.8731 9.16683 13.3333C9.16683 13.7935 9.53992 14.1666 10.0002 14.1666C10.4604 14.1666 10.8335 13.7935 10.8335 13.3333C10.8335 12.8731 10.4604 12.5 10.0002 12.5Z' fill='%23B42318'/%3e%3c/svg%3e"}),o]}),e("img",{src:Ar,className:"dgaui_fileCardCloseIcon",onClick:()=>n()})]}),"error"===r&&i&&e("div",{className:"dgaui_fileCardContentError",children:i})]}),$o=sr.div`
|
|
1245
1423
|
direction: ${e=>e.$theme.direction};
|
|
1246
1424
|
margin-top: 8px;
|
|
1247
1425
|
margin-bottom: 8px;
|
|
@@ -1305,7 +1483,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
|
|
|
1305
1483
|
padding: 8px;
|
|
1306
1484
|
}
|
|
1307
1485
|
}
|
|
1308
|
-
`,
|
|
1486
|
+
`,ko=r=>{var{title:i,helperText:n,uploadText:a,onDrop:l,filesList:s,onFileListItemDeleted:d,submitButton:c}=r,p=v(r,["title","helperText","uploadText","onDrop","filesList","onFileListItemDeleted","submitButton"]);const u=b(),[g,h]=o.useState(!1),m=o.useRef(null),f=o.useRef(null),x=e=>{if(e){const t=[];for(const r of e)t.push({id:A(),file:r});l(t)}};return o.useEffect((()=>{if(m.current){const e=e=>{e.preventDefault(),h(!0)},t=()=>{h(!1)},r=e=>{var t;e.preventDefault(),h(!1),x(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)};return m.current.addEventListener("dragover",e),m.current.addEventListener("dragleave",t),m.current.addEventListener("drop",r),()=>{var o,i,n;null===(o=m.current)||void 0===o||o.removeEventListener("dragover",e),null===(i=m.current)||void 0===i||i.removeEventListener("dragend",t),null===(n=m.current)||void 0===n||n.removeEventListener("drop",r)}}}),[m]),t("div",{className:"dgaui dgaui_fileUploadDropZone",children:[t(So,{$theme:u,ref:m,className:g?"hovered":"",onClick:()=>{var e;return null===(e=f.current)||void 0===e?void 0:e.click()},children:[e(wo,{}),e("span",{className:"title",children:null!=i?i:"Drag and drop files here to upload"}),e("span",{className:"helperText",children:n}),c&&c,!c&&e(Wr,{color:"neutral",style:"neutral",disabled:p.disabled,children:null!=a?a:"Browse Files"}),e("input",Object.assign({ref:f,onChange:e=>x(e.target.files||void 0),type:"file"},p,{multiple:!p.multiple||p.multiple}))]}),null==s?void 0:s.map((t=>{var r;return e(Co,{theme:u,status:t.status,filename:null===(r=t.file)||void 0===r?void 0:r.name,helperText:t.helperText,onDelete:()=>d&&d(t)},t.id)}))]})},So=sr.div`
|
|
1309
1487
|
direction: ${e=>e.$theme.direction};
|
|
1310
1488
|
height: 220px;
|
|
1311
1489
|
width: 100%;
|
|
@@ -1362,176 +1540,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
|
|
|
1362
1540
|
fill: ${e=>e.$theme.palette.neutral[400]};
|
|
1363
1541
|
}
|
|
1364
1542
|
}
|
|
1365
|
-
`,
|
|
1366
|
-
direction: ${e=>e.$theme.direction};
|
|
1367
|
-
display: flex;
|
|
1368
|
-
flex-direction: column;
|
|
1369
|
-
color: ${e=>e.$theme.textColor};
|
|
1370
|
-
width: 100%;
|
|
1371
|
-
cursor: pointer;
|
|
1372
|
-
|
|
1373
|
-
label {
|
|
1374
|
-
text-align: start;
|
|
1375
|
-
margin-bottom: 8px;
|
|
1376
|
-
&.disabled {
|
|
1377
|
-
color: #9da4ae;
|
|
1378
|
-
}
|
|
1379
|
-
&.readonly {
|
|
1380
|
-
color: ${e=>e.$theme.palette.neutral[600]};
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
.dgaui_dropdownItems {
|
|
1385
|
-
position: absolute;
|
|
1386
|
-
top: 35px;
|
|
1387
|
-
left: 0;
|
|
1388
|
-
z-index: 1400;
|
|
1389
|
-
background-color: #fff;
|
|
1390
|
-
width: 100%;
|
|
1391
|
-
opacity: 0;
|
|
1392
|
-
max-height: 300px;
|
|
1393
|
-
overflow-y: scroll;
|
|
1394
|
-
pointer-events: none;
|
|
1395
|
-
border: 1px solid ${e=>e.$theme.palette.neutral[300]};
|
|
1396
|
-
border-radius: 4px;
|
|
1397
|
-
padding: 8px;
|
|
1398
|
-
box-sizing: border-box;
|
|
1399
|
-
${e=>e.$theme.elevation.shadows.xl}
|
|
1400
|
-
cursor: pointer;
|
|
1401
|
-
|
|
1402
|
-
&.slide-bottom {
|
|
1403
|
-
animation: slide-bottom 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
|
|
1404
|
-
pointer-events: all;
|
|
1405
|
-
}
|
|
1406
|
-
@keyframes slide-bottom {
|
|
1407
|
-
0% {
|
|
1408
|
-
transform: translateZ(0) translateY(0);
|
|
1409
|
-
opacity: 0;
|
|
1410
|
-
}
|
|
1411
|
-
100% {
|
|
1412
|
-
transform: translateZ(160px) translateY(8px);
|
|
1413
|
-
opacity: 1;
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
&:has(.dgaui_dropdownSeparator.open) {
|
|
1419
|
-
.dgaui_dropdownContainer:before {
|
|
1420
|
-
top: 20%;
|
|
1421
|
-
transform: rotateZ(180deg);
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
&:has(.dgaui_dropdownContainer:active) {
|
|
1425
|
-
.dgaui_dropdownSeparator {
|
|
1426
|
-
transform: scaleX(0.5) translateY(-2.5px);
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
&:has(.dgaui_dropdownContainer:disabled) {
|
|
1430
|
-
.dgaui_dropdownSeparator {
|
|
1431
|
-
opacity: 0;
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
.dgaui_checkboxContainer {
|
|
1436
|
-
pointer-events: none;
|
|
1437
|
-
}
|
|
1438
|
-
`,ko=sr.div`
|
|
1439
|
-
box-sizing: border-box;
|
|
1440
|
-
outline: none;
|
|
1441
|
-
direction: ${e=>e.$customStyle.direction};
|
|
1442
|
-
border-radius: 4px;
|
|
1443
|
-
width: 100%;
|
|
1444
|
-
height: ${e=>e.$customStyle.height}px;
|
|
1445
|
-
font-size: ${e=>e.$customStyle.fontSize}px;
|
|
1446
|
-
color: ${e=>e.$customStyle.fontColor};
|
|
1447
|
-
border: ${e=>e.$customStyle.border};
|
|
1448
|
-
background-color: ${e=>e.$customStyle.backgroundColor};
|
|
1449
|
-
padding: 0 ${e=>e.$customStyle.padding}px;
|
|
1450
|
-
position: relative;
|
|
1451
|
-
appearance: none;
|
|
1452
|
-
-webkit-appearance: none;
|
|
1453
|
-
-moz-appearance: none;
|
|
1454
|
-
&:-ms-expand {
|
|
1455
|
-
display: none; /* Hide the default arrow in Internet Explorer 10 and Internet Explorer 11 */
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
input {
|
|
1459
|
-
opacity: 0;
|
|
1460
|
-
width: 100%;
|
|
1461
|
-
height: 100%;
|
|
1462
|
-
cursor: pointer;
|
|
1463
|
-
position: absolute;
|
|
1464
|
-
top: 0;
|
|
1465
|
-
left: 0;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
.valueDisplay {
|
|
1469
|
-
height: 100%;
|
|
1470
|
-
display: inline-block;
|
|
1471
|
-
white-space: nowrap;
|
|
1472
|
-
overflow: hidden;
|
|
1473
|
-
width: 80%;
|
|
1474
|
-
text-overflow: ellipsis;
|
|
1475
|
-
|
|
1476
|
-
/* vertical middle align */
|
|
1477
|
-
line-height: ${e=>e.$customStyle.height}px;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
.placeholder {
|
|
1481
|
-
height: 100%;
|
|
1482
|
-
width: 100%;
|
|
1483
|
-
display: flex;
|
|
1484
|
-
align-items: center;
|
|
1485
|
-
color: ${e=>e.$customStyle.theme.palette.neutral[400]};
|
|
1486
|
-
font-size: 16px;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
&:before {
|
|
1490
|
-
content: url(${pr});
|
|
1491
|
-
display: block;
|
|
1492
|
-
top: 30%;
|
|
1493
|
-
inset-inline-end: 8px;
|
|
1494
|
-
position: absolute;
|
|
1495
|
-
transition: all 0.1s;
|
|
1496
|
-
width: 20px;
|
|
1497
|
-
height: 20px;
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
&:focus-within {
|
|
1501
|
-
${e=>e.$customStyle.shadowFocus};
|
|
1502
|
-
border: ${e=>e.$customStyle.borderFocused};
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
&:hover {
|
|
1506
|
-
border: ${e=>e.$customStyle.borderHovered};
|
|
1507
|
-
}
|
|
1508
|
-
&.disabled {
|
|
1509
|
-
pointer-events: none;
|
|
1510
|
-
&:before {
|
|
1511
|
-
content: url(${mr});
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
&.readonly {
|
|
1515
|
-
pointer-events: none;
|
|
1516
|
-
&:before {
|
|
1517
|
-
content: url(${mr});
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
`,So=sr.span`
|
|
1521
|
-
height: 2px;
|
|
1522
|
-
background: ${e=>e.$bgColor};
|
|
1523
|
-
display: block;
|
|
1524
|
-
transform: scaleX(0) translateY(-2.5px);
|
|
1525
|
-
transform-origin: 50%;
|
|
1526
|
-
transition: all 0.2s;
|
|
1527
|
-
border-bottom-left-radius: 50px;
|
|
1528
|
-
border-bottom-right-radius: 50px;
|
|
1529
|
-
z-index: 1;
|
|
1530
|
-
|
|
1531
|
-
&.open {
|
|
1532
|
-
transform: scaleX(0.995) translateY(-2.5px);
|
|
1533
|
-
}
|
|
1534
|
-
`,Bo=r=>{var{title:i,helperText:n,uploadText:a,onDrop:l,filesList:s,onFileListItemDeleted:d,submitButton:c}=r,p=v(r,["title","helperText","uploadText","onDrop","filesList","onFileListItemDeleted","submitButton"]);const u=b(),g=o.useRef(null);return t("div",{className:"dgaui dgaui_fileUploadSingle",children:[t(Eo,{$theme:u,onClick:()=>{var e;return null===(e=g.current)||void 0===e?void 0:e.click()},children:[e("span",{className:"title",children:i}),e("span",{className:"helperText",children:n}),c&&c,!c&&e(Wr,{color:"neutral",style:"neutral",disabled:p.disabled,type:"button",children:a}),e("input",Object.assign({ref:g,onChange:e=>(e=>{if(e){const t=[];for(const r of e)t.push({id:A(),file:r});l(t)}})(e.target.files||void 0),type:"file"},p,{multiple:!!p.multiple&&p.multiple}))]}),null==s?void 0:s.map((t=>e(bo,{theme:u,status:t.status,filename:t.file.name,helperText:t.helperText,onDelete:()=>d&&d(t)},t.id)))]})},Eo=sr.div`
|
|
1543
|
+
`,Bo=r=>{var{title:i,helperText:n,uploadText:a,onDrop:l,filesList:s,onFileListItemDeleted:d,submitButton:c}=r,p=v(r,["title","helperText","uploadText","onDrop","filesList","onFileListItemDeleted","submitButton"]);const u=b(),g=o.useRef(null);return t("div",{className:"dgaui dgaui_fileUploadSingle",children:[t(Eo,{$theme:u,onClick:()=>{var e;return null===(e=g.current)||void 0===e?void 0:e.click()},children:[e("span",{className:"title",children:i}),e("span",{className:"helperText",children:n}),c&&c,!c&&e(Wr,{color:"neutral",style:"neutral",disabled:p.disabled,type:"button",children:a}),e("input",Object.assign({ref:g,onChange:e=>(e=>{if(e){const t=[];for(const r of e)t.push({id:A(),file:r});l(t)}})(e.target.files||void 0),type:"file"},p,{multiple:!!p.multiple&&p.multiple}))]}),null==s?void 0:s.map((t=>e(Co,{theme:u,status:t.status,filename:t.file.name,helperText:t.helperText,onDelete:()=>d&&d(t)},t.id)))]})},Eo=sr.div`
|
|
1535
1544
|
direction: ${e=>e.$theme.direction};
|
|
1536
1545
|
width: 100%;
|
|
1537
1546
|
display: flex;
|
|
@@ -3244,11 +3253,11 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
|
|
|
3244
3253
|
@media screen and (max-width: 640px) {
|
|
3245
3254
|
width: calc(100% - 32px);
|
|
3246
3255
|
}
|
|
3247
|
-
`;const Ti=i=>{var{title:n,content:a,jsxContents:l,children:s,beakPlacement:d="top",beakAlignment:c="center",noBeak:p,inverted:u,backgroundColor:g,icon:h=!1}=i,A=v(i,["title","content","jsxContents","children","beakPlacement","beakAlignment","noBeak","inverted","backgroundColor","icon"]);const f=b(),[x,y]=o.useState(!1),[w,C]=o.useState(!1),$=o.useRef(null),k=o.useRef(null),[S,B]=o.useState({top:0,left:0,caret:{top:0,left:0,color:""}}),E=x||w;let N=u?f.palette.neutral[800]:"#fff";g&&(N=g);const I={toBottom:`${N} transparent transparent transparent`,toTop:`transparent transparent ${N} transparent`,toLeft:`transparent ${N} transparent transparent`,toRight:`transparent transparent transparent ${N}`},z=()=>{if($.current&&k.current){let e=0,t=0,r={top:0,left:0,color:""};const o=$.current.getBoundingClientRect(),i=o.top+window.scrollY,n=o.left+window.scrollX,a=$.current.clientWidth,l=$.current.clientHeight,s=i,p=n,u=k.current.clientWidth,g=k.current.clientHeight;"top"===d&&"start"===c&&(e=s-g-6,t=p,r={top:s-6,left:p+6,color:I.toBottom}),"top"===d&&"center"===c&&(e=s-g-6,t=p-u/2,r={top:s-6,left:p,color:I.toBottom}),"top"===d&&"end"===c&&(e=s-g-6,t=p+18-u,r={top:s-6,left:p,color:I.toBottom}),"bottom"===d&&"start"===c&&(e=s+l+6,t=p,r={top:s+l-6,left:p+6,color:I.toTop}),"bottom"===d&&"center"===c&&(e=s+l+6,t=p-u/2,r={top:s+l-6,left:p,color:I.toTop}),"bottom"===d&&"end"===c&&(e=s+l+6,t=p+24-u,r={top:s+l-6,left:p+6,color:I.toTop}),"left"===d&&"start"===c&&(e=s,t=p-u-6,r={top:s+6,left:p-6,color:I.toRight}),"left"===d&&"center"===c&&(e=s+9-g/2,t=p-u-6,r={top:s+6,left:p-6,color:I.toRight}),"left"===d&&"end"===c&&(e=s-g+24,t=p-u-6,r={top:s+6,left:p-6,color:I.toRight}),"right"===d&&"start"===c&&(e=s,t=p+a+6,r={top:s+6,left:p+a-6,color:I.toLeft}),"right"===d&&"center"===c&&(e=s-g/2+12,t=p+a+6,r={top:s+6,left:p+a-6,color:I.toLeft}),"right"===d&&"end"===c&&(e=s-g+24,t=p+a+6,r={top:s+6,left:p+a-6,color:I.toLeft}),B({top:e,left:t,caret:r})}};return o.useEffect((()=>{if($.current){z();const e=()=>{z()},t=e=>{var t;(null===(t=$.current)||void 0===t?void 0:t.contains(e.target))||(y(!1),C(!1))},r=e=>{z(),y(!0)},o=()=>{y(!1)};return window.addEventListener("click",t),window.addEventListener("resize",e),$.current.addEventListener("mouseover",r),$.current.addEventListener("mouseleave",o),$.current.addEventListener("click",r),()=>{var i,n,a;window.removeEventListener("resize",e),window.removeEventListener("click",t),null===(i=null==$?void 0:$.current)||void 0===i||i.removeEventListener("mouseover",r),null===(n=null==$?void 0:$.current)||void 0===n||n.removeEventListener("mouseleave",o),null===(a=null==$?void 0:$.current)||void 0===a||a.removeEventListener("click",r)}}}),[$,k,d,c]),t(Oi,Object.assign({className:m("dgaui dgaui_tooltip",A.className),$theme:f,$inverted:u},A,{ref:$,onClick:()=>{C(!0)},$position:S,children:[s,t(Qi,{ref:k,$theme:f,$position:S,$inverted:u,$backgroundColor:g,className:"dgaui_tooltipContent"+(E?" show-tooltip":""),children:[l&&l,!l&&t(r,{children:[h&&e("div",{className:"dgaui_tooltipContentIcon",children:e("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHaSURBVHgBjVQ9SMNAFP4SOxR0cHAQFJv6Ax3rIAqK1CIqiFh0UFC04uAgojiog2JxchJdBEGFujmZxcFBzVgQtIKCqGA2fwYpmEqp0PjuMDWkSdoPrne59/L1fXffiwAXtIUiEk1swAskFUVOOeUK1o1QKFKZETFPy6hBYoJKb8QS53LclaglFAmWiTixIUABYQ5dCUVWC4iYDF3EDW1UogToQCpHZFeKnGTPZUagtj7ASKrNyU0NfnSHO+Crq4GmfUNLp81SvKKAvkZfIK6qDxkPryYciVrl9PeGsbo0l39+ffvA7OIaXt8/zGkSnecCzTHxb2PdWvr0xAienl/QMziOobEZVFSUY3V5DjaYZD+eIN0SbA734OgY17d3+NLSfNzQmkm1gcTOVyR/BO2ip2cXXA7DyPAAOttbObEDJA+K4GhvC02Nflwn77Cze+iYx4hUN6J9kqiRNJdquOu5j+jWXlDchPbQoSYuZb9xa3GnvM2NFX6DLkQxNnFDVvkCSdI4Si4rcHU2+4P7h0d8fqbsq1HkKbbMtwjrM3LqpSCU2CI6UoKOZqPfDGlgPcMC7F+Ks0DN6Q5NawYZLEqRdRqSJcRejHtz2LZ+m2yJDPBv079hVXMFVvwCXOukAPYYzukAAAAASUVORK5CYII="})}),t("div",{className:"dgaui_tooltipContentText",children:[e("div",{className:"dgaui_tooltipTitle",children:n}),e("div",{className:"dgaui_tooltipDescription",children:a})]})]})]}),!p&&e("span",{className:E?"show":""})]}))},Oi=sr.div`
|
|
3256
|
+
`;const Ti=i=>{var{title:n,content:a,jsxContents:l,children:s,beakPlacement:d="top",beakAlignment:c="center",noBeak:p,inverted:u,backgroundColor:g,icon:h=!1}=i,A=v(i,["title","content","jsxContents","children","beakPlacement","beakAlignment","noBeak","inverted","backgroundColor","icon"]);const f=b(),[x,y]=o.useState(!1),[w,C]=o.useState(!1),$=o.useRef(null),k=o.useRef(null),[S,B]=o.useState({top:0,left:0,caret:{top:0,left:0,color:""}}),E=x||w;let N=u?f.palette.neutral[800]:"#fff";g&&(N=g);const I={toBottom:`${N} transparent transparent transparent`,toTop:`transparent transparent ${N} transparent`,toLeft:`transparent ${N} transparent transparent`,toRight:`transparent transparent transparent ${N}`},z=()=>{if($.current&&k.current){let e=0,t=0,r={top:0,left:0,color:""};const o=$.current.getBoundingClientRect(),i=o.top+window.scrollY,n=o.left+window.scrollX,a=$.current.clientWidth,l=$.current.clientHeight,s=i,p=n,u=k.current.clientWidth,g=k.current.clientHeight;"top"===d&&"start"===c&&(e=s-g-6,t=p,r={top:s-6,left:p+6,color:I.toBottom}),"top"===d&&"center"===c&&(e=s-g-6,t=p-u/2,r={top:s-6,left:p,color:I.toBottom}),"top"===d&&"end"===c&&(e=s-g-6,t=p+18-u,r={top:s-6,left:p,color:I.toBottom}),"bottom"===d&&"start"===c&&(e=s+l+6,t=p,r={top:s+l-6,left:p+6,color:I.toTop}),"bottom"===d&&"center"===c&&(e=s+l+6,t=p-u/2,r={top:s+l-6,left:p,color:I.toTop}),"bottom"===d&&"end"===c&&(e=s+l+6,t=p+24-u,r={top:s+l-6,left:p+6,color:I.toTop}),"left"===d&&"start"===c&&(e=s,t=p-u-6,r={top:s+6,left:p-6,color:I.toRight}),"left"===d&&"center"===c&&(e=s+9-g/2,t=p-u-6,r={top:s+6,left:p-6,color:I.toRight}),"left"===d&&"end"===c&&(e=s-g+24,t=p-u-6,r={top:s+6,left:p-6,color:I.toRight}),"right"===d&&"start"===c&&(e=s,t=p+a+6,r={top:s+6,left:p+a-6,color:I.toLeft}),"right"===d&&"center"===c&&(e=s-g/2+12,t=p+a+6,r={top:s+6,left:p+a-6,color:I.toLeft}),"right"===d&&"end"===c&&(e=s-g+24,t=p+a+6,r={top:s+6,left:p+a-6,color:I.toLeft}),B({top:e,left:t,caret:r})}};return o.useEffect((()=>{if($.current){z();const e=()=>{z()},t=e=>{var t;(null===(t=$.current)||void 0===t?void 0:t.contains(e.target))||(y(!1),C(!1))},r=e=>{z(),y(!0)},o=()=>{y(!1)};return window.addEventListener("click",t),window.addEventListener("resize",e),$.current.addEventListener("mouseover",r),$.current.addEventListener("mouseleave",o),$.current.addEventListener("click",r),()=>{var i,n,a;window.removeEventListener("resize",e),window.removeEventListener("click",t),null===(i=null==$?void 0:$.current)||void 0===i||i.removeEventListener("mouseover",r),null===(n=null==$?void 0:$.current)||void 0===n||n.removeEventListener("mouseleave",o),null===(a=null==$?void 0:$.current)||void 0===a||a.removeEventListener("click",r)}}}),[$,k,d,c]),t(Oi,Object.assign({className:m("dgaui dgaui_tooltip",A.className),$theme:f,$inverted:u},A,{ref:$,onClick:()=>{C(!0)},$position:S,children:[s,t(Qi,{ref:k,$theme:f,$position:S,$inverted:u,$backgroundColor:g,className:"dgaui_tooltipContent"+(E?" show-tooltip":""),children:[l&&l,!l&&t(r,{children:[h&&e("div",{className:"dgaui_tooltipContentIcon",children:e("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHaSURBVHgBjVQ9SMNAFP4SOxR0cHAQFJv6Ax3rIAqK1CIqiFh0UFC04uAgojiog2JxchJdBEGFujmZxcFBzVgQtIKCqGA2fwYpmEqp0PjuMDWkSdoPrne59/L1fXffiwAXtIUiEk1swAskFUVOOeUK1o1QKFKZETFPy6hBYoJKb8QS53LclaglFAmWiTixIUABYQ5dCUVWC4iYDF3EDW1UogToQCpHZFeKnGTPZUagtj7ASKrNyU0NfnSHO+Crq4GmfUNLp81SvKKAvkZfIK6qDxkPryYciVrl9PeGsbo0l39+ffvA7OIaXt8/zGkSnecCzTHxb2PdWvr0xAienl/QMziOobEZVFSUY3V5DjaYZD+eIN0SbA734OgY17d3+NLSfNzQmkm1gcTOVyR/BO2ip2cXXA7DyPAAOttbObEDJA+K4GhvC02Nflwn77Cze+iYx4hUN6J9kqiRNJdquOu5j+jWXlDchPbQoSYuZb9xa3GnvM2NFX6DLkQxNnFDVvkCSdI4Si4rcHU2+4P7h0d8fqbsq1HkKbbMtwjrM3LqpSCU2CI6UoKOZqPfDGlgPcMC7F+Ks0DN6Q5NawYZLEqRdRqSJcRejHtz2LZ+m2yJDPBv079hVXMFVvwCXOukAPYYzukAAAAASUVORK5CYII="})}),t("div",{className:"dgaui_tooltipContentText",children:[e("div",{className:"dgaui_tooltipTitle",children:n}),e("div",{className:"dgaui_tooltipDescription",children:a})]})]})]}),!p&&e("span",{className:"caret"+(E?" show":"")})]}))},Oi=sr.div`
|
|
3248
3257
|
direction: ${e=>e.$theme.direction};
|
|
3249
3258
|
display: inline-block;
|
|
3250
3259
|
|
|
3251
|
-
|
|
3260
|
+
.caret {
|
|
3252
3261
|
position: absolute;
|
|
3253
3262
|
display: none;
|
|
3254
3263
|
z-index: 1;
|
|
@@ -3269,7 +3278,6 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
|
|
|
3269
3278
|
left: ${e=>e.$position.left}px;
|
|
3270
3279
|
z-index: 1;
|
|
3271
3280
|
background-color: ${e=>e.$backgroundColor?e.$backgroundColor:e.$inverted?e.$theme.palette.neutral[800]:"#fff"};
|
|
3272
|
-
width: 240px;
|
|
3273
3281
|
opacity: 0;
|
|
3274
3282
|
display: flex;
|
|
3275
3283
|
visibility: hidden;
|
|
@@ -4597,5 +4605,5 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
|
|
|
4597
4605
|
}
|
|
4598
4606
|
}
|
|
4599
4607
|
}
|
|
4600
|
-
`;export{gr as Accordion,Nr as Autocomplete,Rr as Avatar,Tr as Breadcrumb,Wr as Button,Gr as Card,Un as Carousel,yr as Checkbox,un as Chip,Vn as CircularProgressBar,Yn as CodeSnippet,Wi as ContentSwitcher,
|
|
4608
|
+
`;export{gr as Accordion,Nr as Autocomplete,Rr as Avatar,Tr as Breadcrumb,Wr as Button,Gr as Card,Un as Carousel,yr as Checkbox,un as Chip,Vn as CircularProgressBar,Yn as CodeSnippet,Wi as ContentSwitcher,bo as DatePicker,Gi as Divider,ko as DropZone,ho as Dropdown,Cr as DropdownItem,Co as FileCard,Bo as FileUpload,hn as FloatingButton,Io as Grid,Yi as HeaderMenuItem,Ro as InlineAlert,Oo as Link,Yo as List,Vo as Loading,so as Menu,Wo as MenuItem,Go as MenuItemGroup,Zo as Modal,Li as NavigationDrawerItem,ei as Notification,Cn as NumberInput,ni as Pagination,xn as ProgressBar,ci as ProgressIndicator,Dn as Quote,fn as RadialStepper,gi as Radio,mi as RadioGroup,En as RangeSlider,cn as Rating,Pi as SearchBox,On as SecondNavHeader,ln as Skeleton,Zi as SkeletonCircle,_i as SkeletonLine,on as SkeletonRectangle,tn as SkeletonSquare,Ln as SlideoutMenu,Sn as Slider,vi as StatusTag,fi as Switch,oi as Tab,ki as TabList,wi as Table,Sr as Tag,io as TextInput,Ei as Textarea,u as ThemeProvider,Ti as Tooltip,Ui as toast,b as useTheme,g as withRtl};
|
|
4601
4609
|
//# sourceMappingURL=index.js.map
|