@hyperbridge/ui 0.0.18 → 0.0.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/index.d.mts +1 -0
- package/dist/index.mjs +7 -3
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -693,6 +693,7 @@ declare const walletHeaderVariants: (props?: ({
|
|
|
693
693
|
interface WalletHeaderProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof walletHeaderVariants> {
|
|
694
694
|
asChild?: boolean;
|
|
695
695
|
defaultOpen?: boolean;
|
|
696
|
+
persistOpen?: boolean;
|
|
696
697
|
}
|
|
697
698
|
declare const WalletHeader: React$1.ForwardRefExoticComponent<WalletHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
698
699
|
interface WalletConnectedHeaderProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
package/dist/index.mjs
CHANGED
|
@@ -3929,21 +3929,25 @@ var WalletHeader = React14.forwardRef(
|
|
|
3929
3929
|
variant,
|
|
3930
3930
|
asChild = false,
|
|
3931
3931
|
defaultOpen = false,
|
|
3932
|
+
persistOpen = true,
|
|
3932
3933
|
children
|
|
3933
3934
|
} = _b, props = __objRest(_b, [
|
|
3934
3935
|
"className",
|
|
3935
3936
|
"variant",
|
|
3936
3937
|
"asChild",
|
|
3937
3938
|
"defaultOpen",
|
|
3939
|
+
"persistOpen",
|
|
3938
3940
|
"children"
|
|
3939
3941
|
]);
|
|
3940
3942
|
const Comp = asChild ? Slot10 : "div";
|
|
3941
3943
|
const [show, setShow] = React14.useState(() => {
|
|
3942
|
-
return globalWalletHeaderState !== null ? globalWalletHeaderState : defaultOpen;
|
|
3944
|
+
return persistOpen && globalWalletHeaderState !== null ? globalWalletHeaderState : defaultOpen;
|
|
3943
3945
|
});
|
|
3944
3946
|
React14.useEffect(() => {
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
+
if (persistOpen) {
|
|
3948
|
+
globalWalletHeaderState = show;
|
|
3949
|
+
}
|
|
3950
|
+
}, [show, persistOpen]);
|
|
3947
3951
|
return /* @__PURE__ */ jsx41(WalletHeaderContext.Provider, { value: { show, setShow }, children: /* @__PURE__ */ jsx41(
|
|
3948
3952
|
Comp,
|
|
3949
3953
|
__spreadProps(__spreadValues({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperbridge/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"typescript": "5.8.3",
|
|
34
34
|
"vite": "^6.3.4",
|
|
35
35
|
"vitest": "^3.1.2",
|
|
36
|
-
"@repo/
|
|
37
|
-
"@repo/
|
|
36
|
+
"@repo/eslint-config": "0.0.0",
|
|
37
|
+
"@repo/typescript-config": "0.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@radix-ui/react-dialog": "^1.1.14",
|