dga-ui-react 1.8.21 → 1.8.23

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/esm/index.js CHANGED
@@ -2453,11 +2453,11 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
2453
2453
  .dgaui_radioDot {
2454
2454
  border-radius: 50px;
2455
2455
  position: absolute;
2456
- top: 3.5px;
2457
- left: 3.5px;
2456
+ top: 4px;
2457
+ left: 4px;
2458
2458
  z-index: 1;
2459
- width: 15px;
2460
- height: 15px;
2459
+ width: 14px;
2460
+ height: 14px;
2461
2461
  background-color: none;
2462
2462
  }
2463
2463
 
@@ -3252,9 +3252,10 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
3252
3252
  @media screen and (max-width: 640px) {
3253
3253
  width: calc(100% - 32px);
3254
3254
  }
3255
- `;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`
3255
+ `;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=0,i=0,n=$.current.clientWidth,a=$.current.clientHeight,l=o,s=i,p=k.current.clientWidth,u=k.current.clientHeight;"top"===d&&"start"===c&&(e=l-u-6,t=s,r={top:l-6,left:s+6,color:I.toBottom}),"top"===d&&"center"===c&&(e=l-u-6,t=s-p/2,r={top:l-6,left:s,color:I.toBottom}),"top"===d&&"end"===c&&(e=l-u-6,t=s+18-p,r={top:l-6,left:s,color:I.toBottom}),"bottom"===d&&"start"===c&&(e=l+a+6,t=s,r={top:l+a-6,left:s+6,color:I.toTop}),"bottom"===d&&"center"===c&&(e=l+a+6,t=s-p/2,r={top:l+a-6,left:s,color:I.toTop}),"bottom"===d&&"end"===c&&(e=l+a+6,t=s+24-p,r={top:l+a-6,left:s+6,color:I.toTop}),"left"===d&&"start"===c&&(e=l,t=s-p-6,r={top:l+6,left:s-6,color:I.toRight}),"left"===d&&"center"===c&&(e=l+9-u/2,t=s-p-6,r={top:l+6,left:s-6,color:I.toRight}),"left"===d&&"end"===c&&(e=l-u+24,t=s-p-6,r={top:l+6,left:s-6,color:I.toRight}),"right"===d&&"start"===c&&(e=l,t=s+n+6,r={top:l+6,left:s+n-6,color:I.toLeft}),"right"===d&&"center"===c&&(e=l-u/2+12,t=s+n+6,r={top:l+6,left:s+n-6,color:I.toLeft}),"right"===d&&"end"===c&&(e=l-u+24,t=s+n+6,r={top:l+6,left:s+n-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,E]),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`
3256
3256
  direction: ${e=>e.$theme.direction};
3257
3257
  display: inline-block;
3258
+ position: relative;
3258
3259
 
3259
3260
  .caret {
3260
3261
  position: absolute;
@@ -3277,9 +3278,8 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
3277
3278
  left: ${e=>e.$position.left}px;
3278
3279
  z-index: 1;
3279
3280
  background-color: ${e=>e.$backgroundColor?e.$backgroundColor:e.$inverted?e.$theme.palette.neutral[800]:"#fff"};
3280
- opacity: 0;
3281
- display: flex;
3282
- visibility: hidden;
3281
+ opacity: 1;
3282
+ display: none;
3283
3283
  max-height: 400px;
3284
3284
 
3285
3285
  border-radius: 4px;
@@ -3297,6 +3297,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
3297
3297
  .dgaui_tooltipContentText {
3298
3298
  padding: 8px;
3299
3299
  font-size: 12px;
3300
+ width: max-content;
3300
3301
 
3301
3302
  .dgaui_tooltipTitle {
3302
3303
  font-weight: 600;
@@ -3310,17 +3311,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import o,{useDeb
3310
3311
  }
3311
3312
 
3312
3313
  &.show-tooltip {
3313
- visibility: visible;
3314
-
3315
- animation: show-tooltip 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
3316
- }
3317
- @keyframes show-tooltip {
3318
- 0% {
3319
- opacity: 0;
3320
- }
3321
- 100% {
3322
- opacity: 1;
3323
- }
3314
+ display: flex;
3324
3315
  }
3325
3316
  `,Yi=t=>{var{children:r,selected:o}=t,i=v(t,["children","selected"]);const n=b();return e(Hi,Object.assign({},i,{className:m("dgaui dgaui_headerMenuItem",i.className),$theme:n,$selected:o,children:r}))},Hi=sr.button`
3326
3317
  direction: ${e=>e.$theme.direction};