tgui-core 4.3.0 → 4.3.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as e,jsx as t,jsxs as n}from"react/jsx-runtime";import{classes as o}from"../common/react.js";import{FloatingPortal as i,autoUpdate as r,flip as a,offset as l,shift as s,size as c,useClick as d,useDismiss as m,useFloating as p,useHover as
|
|
1
|
+
import{Fragment as e,jsx as t,jsxs as n}from"react/jsx-runtime";import{classes as o}from"../common/react.js";import{FloatingPortal as i,autoUpdate as r,flip as a,offset as l,shift as s,size as c,useClick as d,useDismiss as m,useFloating as p,useHover as g,useInteractions as f,useTransitionStatus as h}from"@floating-ui/react";import{cloneElement as u,isValidElement as C,useEffect as v,useState as w}from"react";function F(F){let b,{allowedOutsideClasses:x,animationDuration:y,children:O,closeAfterInteract:R,content:j,contentAutoWidth:k,contentClasses:z,contentOffset:E=6,contentStyles:M,disabled:P,hoverDelay:S,hoverOpen:N,handleOpen:$,onMounted:q,placement:A,preventPortal:B,stopChildPropagation:D,onOpenChange:G}=F,[H,I]=w(!1),{refs:J,floatingStyles:K,context:L}=p({middleware:[l(E),a({padding:6}),s(),k&&c({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})],onOpenChange(e){I(e),G?.(e)},open:H,placement:A||"bottom",transform:!1,whileElementsMounted:(e,t,n)=>(void 0!==q&&q(),r(e,t,n,{ancestorResize:!1,ancestorScroll:!1,elementResize:!1}))}),{isMounted:Q,status:T}=h(L,{duration:y||200}),U=m(L,{ancestorScroll:!0,outsidePress:e=>!x||e.target instanceof Element&&!e.target.closest(x)}),V=d(L,{enabled:!P}),W=g(L,{enabled:!P,restMs:S||200}),X=void 0!==$,{getReferenceProps:Y,getFloatingProps:Z}=f(X?[]:[U,N?W:V]),_=Y({ref:J.setReference,...D&&{onClick:e=>e.stopPropagation()}}),ee=Z({onClick:()=>{R&&L.onOpenChange(!1)},ref:J.setFloating});v(()=>{X&&L.onOpenChange($)},[$]),b=C(O)?u(O,_):t("div",{..._,children:O});let et=t("div",{className:o(["Floating",!y&&"Floating--animated",z]),"data-position":L.placement,"data-transition":T,style:{...K,...M},...ee,children:j});return n(e,{children:[b,Q&&!!j&&(B?et:t(i,{id:"tgui-root",children:et}))]})}export{F as Floating};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Floating as o}from"./Floating.js";function e(e){let{content:n,children:r,position:i}=e;return t(o,{content:n,
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Floating as o}from"./Floating.js";function e(e){let{content:n,children:r,position:i}=e;return t(o,{content:n,contentClasses:"Tooltip",hoverOpen:!0,placement:i,children:r})}export{e as Tooltip};
|
package/package.json
CHANGED
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
},
|
|
7
7
|
"description": "TGUI core component library",
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@biomejs/biome": "^2.0.0
|
|
9
|
+
"@biomejs/biome": "^2.0.0",
|
|
10
10
|
"@rsbuild/core": "^1.3.22",
|
|
11
11
|
"@rsbuild/plugin-react": "^1.3.2",
|
|
12
12
|
"@rsbuild/plugin-sass": "^1.3.2",
|
|
13
|
-
"@rslib/core": "^0.
|
|
14
|
-
"@storybook/addon-docs": "^9.0.
|
|
15
|
-
"@types/bun": "^1.2.
|
|
16
|
-
"@types/react": "^19.1.
|
|
13
|
+
"@rslib/core": "^0.10.0",
|
|
14
|
+
"@storybook/addon-docs": "^9.0.11",
|
|
15
|
+
"@types/bun": "^1.2.16",
|
|
16
|
+
"@types/react": "^19.1.8",
|
|
17
17
|
"@types/react-dom": "^19.1.6",
|
|
18
18
|
"prettier": "^3.5.3",
|
|
19
19
|
"sass": "^1.89.2",
|
|
20
|
-
"storybook": "^9.0.
|
|
20
|
+
"storybook": "^9.0.11",
|
|
21
21
|
"storybook-addon-sass-postcss": "^0.3.2",
|
|
22
22
|
"storybook-react-rsbuild": "^2.0.1",
|
|
23
23
|
"typescript": "^5.8.3"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
],
|
|
52
52
|
"license": "MIT",
|
|
53
53
|
"name": "tgui-core",
|
|
54
|
-
"packageManager": "bun@1.2.
|
|
54
|
+
"packageManager": "bun@1.2.16",
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"react": "^19.1.0",
|
|
57
57
|
"react-dom": "^19.1.0"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"test": "bun test"
|
|
70
70
|
},
|
|
71
71
|
"type": "module",
|
|
72
|
-
"version": "4.3.
|
|
72
|
+
"version": "4.3.1"
|
|
73
73
|
}
|