@gardenfi/garden-book 0.3.2 → 0.3.4-beta.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.
- package/dist/BottomSheet/BottomSheet.d.ts +4 -0
- package/dist/BottomSheet/index.js +38 -26
- package/dist/Button/index.js +6 -6
- package/dist/CookieConsent/CookieConsent.d.ts +7 -0
- package/dist/CookieConsent/CookieConsent.js +61 -37
- package/dist/CookieConsent/CookieConsentNotice.js +13 -14
- package/dist/CookieConsent/CookieConsentPreferences.js +17 -17
- package/dist/CookieConsent/store.js +19 -19
- package/dist/CookieConsent/utils.d.ts +8 -0
- package/dist/CookieConsent/utils.js +41 -25
- package/dist/DashboardLayout/DashboardSidebar.js +5 -5
- package/dist/DashboardLayout/MobileMenu.js +74 -66
- package/dist/Footer/Footer.d.ts +34 -0
- package/dist/Footer/FooterLink.d.ts +1 -0
- package/dist/Footer/FooterLink.js +14 -8
- package/dist/Footer/index.js +249 -189
- package/dist/Icons/BugReportIcon.d.ts +5 -0
- package/dist/Icons/BugReportIcon.js +16 -0
- package/dist/Icons/SecurityVerifiedIcon.d.ts +5 -0
- package/dist/Icons/SecurityVerifiedIcon.js +22 -0
- package/dist/Icons/YoutubeIcon.js +2 -2
- package/dist/Icons/index.d.ts +2 -0
- package/dist/Icons/index.js +66 -62
- package/dist/Logo/AmberLogoFull.d.ts +5 -0
- package/dist/Logo/AmberLogoFull.js +25 -0
- package/dist/Logo/ArbitrumLogoFull.d.ts +5 -0
- package/dist/Logo/ArbitrumLogoFull.js +122 -0
- package/dist/Logo/BaseLogoFull.d.ts +5 -0
- package/dist/Logo/BaseLogoFull.js +34 -0
- package/dist/Logo/BnbChainLogoFull.d.ts +5 -0
- package/dist/Logo/BnbChainLogoFull.js +83 -0
- package/dist/Logo/HyperliquidLogoFull.d.ts +5 -0
- package/dist/Logo/HyperliquidLogoFull.js +104 -0
- package/dist/Logo/JumperLogoFull.d.ts +5 -0
- package/dist/Logo/JumperLogoFull.js +77 -0
- package/dist/Logo/LiFiLogoFull.d.ts +5 -0
- package/dist/Logo/LiFiLogoFull.js +43 -0
- package/dist/Logo/LightsparkLogoFull.d.ts +5 -0
- package/dist/Logo/LightsparkLogoFull.js +56 -0
- package/dist/Logo/LitecoinLogoFull.d.ts +5 -0
- package/dist/Logo/LitecoinLogoFull.js +97 -0
- package/dist/Logo/MaestroLogoFull.d.ts +5 -0
- package/dist/Logo/MaestroLogoFull.js +31 -0
- package/dist/Logo/MegaEthLogoFull.d.ts +5 -0
- package/dist/Logo/MegaEthLogoFull.js +94 -0
- package/dist/Logo/MonadLogoFull.d.ts +5 -0
- package/dist/Logo/MonadLogoFull.js +62 -0
- package/dist/Logo/MulticoinCapitalLogoFull.d.ts +5 -0
- package/dist/Logo/MulticoinCapitalLogoFull.js +154 -0
- package/dist/Logo/PhantomLogoFull.d.ts +5 -0
- package/dist/Logo/PhantomLogoFull.js +76 -0
- package/dist/Logo/RangoLogoFull.d.ts +5 -0
- package/dist/Logo/RangoLogoFull.js +168 -0
- package/dist/Logo/SatsTerminalLogoFull.d.ts +5 -0
- package/dist/Logo/SatsTerminalLogoFull.js +81 -0
- package/dist/Logo/SolanaLogoFull.d.ts +5 -0
- package/dist/Logo/SolanaLogoFull.js +84 -0
- package/dist/Logo/StarknetLogoFull.d.ts +5 -0
- package/dist/Logo/StarknetLogoFull.js +141 -0
- package/dist/Logo/SwapKitLogoFull.d.ts +5 -0
- package/dist/Logo/SwapKitLogoFull.js +97 -0
- package/dist/Logo/XverseLogoFull.d.ts +5 -0
- package/dist/Logo/XverseLogoFull.js +99 -0
- package/dist/Logo/index.d.ts +20 -0
- package/dist/Logo/index.js +94 -54
- package/dist/ResponsiveModal/ResponsiveModal.d.ts +29 -11
- package/dist/ResponsiveModal/index.js +53 -54
- package/dist/Typography/Typography.d.ts +9 -6
- package/dist/Typography/index.js +64 -54
- package/dist/index.d.ts +44 -44
- package/dist/index.js +370 -326
- package/dist/style.css +1 -1
- package/dist/utils/index.js +27 -4
- package/package.json +1 -1
package/dist/Logo/index.js
CHANGED
|
@@ -1,78 +1,118 @@
|
|
|
1
1
|
import { ArbitrumLogo as e } from "./ArbitrumLogo.js";
|
|
2
2
|
import { BTCLogo as m } from "./BTCLogo.js";
|
|
3
|
-
import { CatalogLogo as
|
|
4
|
-
import { Coinbase as
|
|
3
|
+
import { CatalogLogo as l } from "./CatalogLogo.js";
|
|
4
|
+
import { Coinbase as f } from "./Coinbase.js";
|
|
5
5
|
import { EthereumLogo as g } from "./EthereumLogo.js";
|
|
6
|
-
import { GardenExplorer as
|
|
7
|
-
import { GardenFullLogo as
|
|
8
|
-
import { GardenLogo as
|
|
9
|
-
import { GardenLogoText as
|
|
10
|
-
import { GardenStrokeIcon as
|
|
11
|
-
import { GMXLogo as
|
|
12
|
-
import { PhantomIcon as
|
|
13
|
-
import { PolygonLogo as
|
|
14
|
-
import { RadiantLogo as
|
|
15
|
-
import { TrailOfBits as
|
|
16
|
-
import { TrustWallet as
|
|
17
|
-
import { WalletConnect as
|
|
18
|
-
import { SwellBTC as
|
|
19
|
-
import { DLCBTC as
|
|
20
|
-
import { TraderJoe as
|
|
21
|
-
import { Debridge as
|
|
22
|
-
import { Camelot as
|
|
23
|
-
import { GMX as
|
|
6
|
+
import { GardenExplorer as n } from "./GardenExplorer.js";
|
|
7
|
+
import { GardenFullLogo as i } from "./GardenFullLogo.js";
|
|
8
|
+
import { GardenLogo as d } from "./GardenLogo.js";
|
|
9
|
+
import { GardenLogoText as C } from "./GardenLogoText.js";
|
|
10
|
+
import { GardenStrokeIcon as s } from "./GardenStrokeIcon.js";
|
|
11
|
+
import { GMXLogo as h } from "./GMXLogo.js";
|
|
12
|
+
import { PhantomIcon as M } from "./PhantomIcon.js";
|
|
13
|
+
import { PolygonLogo as b } from "./PolygonLogo.js";
|
|
14
|
+
import { RadiantLogo as D } from "./RadiantLogo.js";
|
|
15
|
+
import { TrailOfBits as A } from "./TrailOfBits.js";
|
|
16
|
+
import { TrustWallet as P } from "./TrustWallet.js";
|
|
17
|
+
import { WalletConnect as R } from "./WalletConnect.js";
|
|
18
|
+
import { SwellBTC as v } from "./SwellBTC.js";
|
|
19
|
+
import { DLCBTC as J } from "./DLCBTC.js";
|
|
20
|
+
import { TraderJoe as W } from "./TraderJoe.js";
|
|
21
|
+
import { Debridge as H } from "./Debridge.js";
|
|
22
|
+
import { Camelot as N } from "./Camelot.js";
|
|
23
|
+
import { GMX as j } from "./GMX.js";
|
|
24
24
|
import { Solv as Q } from "./Solv.js";
|
|
25
25
|
import { PancakeSwap as Y } from "./PancakeSwap.js";
|
|
26
26
|
import { Dodo as _ } from "./DODO.js";
|
|
27
27
|
import { Vertex as oo } from "./Vertex.js";
|
|
28
28
|
import { Radiant as eo } from "./Radiant.js";
|
|
29
29
|
import { GardenIcon as mo } from "./GardenIcon.js";
|
|
30
|
-
import { GardenIconOutline as
|
|
31
|
-
import { NFTIcon as
|
|
30
|
+
import { GardenIconOutline as lo } from "./GardenIconOutline.js";
|
|
31
|
+
import { NFTIcon as fo } from "./NFTIcon.js";
|
|
32
32
|
import { GardenExplorerAlt as go } from "./GardenExplorerAlt.js";
|
|
33
|
-
import { GardenDocs as
|
|
33
|
+
import { GardenDocs as no } from "./GardenDocs.js";
|
|
34
34
|
import { GardenLogoMarkDark as io } from "./GardenLogoMarkDark.js";
|
|
35
|
-
import { GardenLogoMarkLight as
|
|
36
|
-
import { GardenLogoDark as
|
|
37
|
-
import { GardenLogoLight as
|
|
38
|
-
import { Code4renaLogo as
|
|
35
|
+
import { GardenLogoMarkLight as Go } from "./GardenLogoMarkLight.js";
|
|
36
|
+
import { GardenLogoDark as co } from "./GardenLogoDark.js";
|
|
37
|
+
import { GardenLogoLight as To } from "./GardenLogoLight.js";
|
|
38
|
+
import { Code4renaLogo as ko } from "./Code4renaLogo.js";
|
|
39
|
+
import { AmberLogoFull as So } from "./AmberLogoFull.js";
|
|
40
|
+
import { ArbitrumLogoFull as Bo } from "./ArbitrumLogoFull.js";
|
|
41
|
+
import { BaseLogoFull as Io } from "./BaseLogoFull.js";
|
|
42
|
+
import { BnbChainLogoFull as Eo } from "./BnbChainLogoFull.js";
|
|
43
|
+
import { HyperliquidLogoFull as wo } from "./HyperliquidLogoFull.js";
|
|
44
|
+
import { JumperLogoFull as Xo } from "./JumperLogoFull.js";
|
|
45
|
+
import { LiFiLogoFull as yo } from "./LiFiLogoFull.js";
|
|
46
|
+
import { LightsparkLogoFull as Oo } from "./LightsparkLogoFull.js";
|
|
47
|
+
import { LitecoinLogoFull as qo } from "./LitecoinLogoFull.js";
|
|
48
|
+
import { MaestroLogoFull as Ko } from "./MaestroLogoFull.js";
|
|
49
|
+
import { MegaEthLogoFull as Vo } from "./MegaEthLogoFull.js";
|
|
50
|
+
import { MonadLogoFull as zo } from "./MonadLogoFull.js";
|
|
51
|
+
import { MulticoinCapitalLogoFull as Uo } from "./MulticoinCapitalLogoFull.js";
|
|
52
|
+
import { PhantomLogoFull as Zo } from "./PhantomLogoFull.js";
|
|
53
|
+
import { RangoLogoFull as $o } from "./RangoLogoFull.js";
|
|
54
|
+
import { SolanaLogoFull as rr } from "./SolanaLogoFull.js";
|
|
55
|
+
import { StarknetLogoFull as tr } from "./StarknetLogoFull.js";
|
|
56
|
+
import { SwapKitLogoFull as pr } from "./SwapKitLogoFull.js";
|
|
57
|
+
import { XverseLogoFull as xr } from "./XverseLogoFull.js";
|
|
58
|
+
import { SatsTerminalLogoFull as ar } from "./SatsTerminalLogoFull.js";
|
|
39
59
|
export {
|
|
60
|
+
So as AmberLogoFull,
|
|
40
61
|
e as ArbitrumLogo,
|
|
62
|
+
Bo as ArbitrumLogoFull,
|
|
41
63
|
m as BTCLogo,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
64
|
+
Io as BaseLogoFull,
|
|
65
|
+
Eo as BnbChainLogoFull,
|
|
66
|
+
N as Camelot,
|
|
67
|
+
l as CatalogLogo,
|
|
68
|
+
ko as Code4renaLogo,
|
|
69
|
+
f as Coinbase,
|
|
70
|
+
J as DLCBTC,
|
|
71
|
+
H as Debridge,
|
|
48
72
|
_ as Dodo,
|
|
49
73
|
g as EthereumLogo,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
74
|
+
j as GMX,
|
|
75
|
+
h as GMXLogo,
|
|
76
|
+
no as GardenDocs,
|
|
77
|
+
n as GardenExplorer,
|
|
54
78
|
go as GardenExplorerAlt,
|
|
55
|
-
|
|
79
|
+
i as GardenFullLogo,
|
|
56
80
|
mo as GardenIcon,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
81
|
+
lo as GardenIconOutline,
|
|
82
|
+
d as GardenLogo,
|
|
83
|
+
co as GardenLogoDark,
|
|
84
|
+
To as GardenLogoLight,
|
|
61
85
|
io as GardenLogoMarkDark,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
86
|
+
Go as GardenLogoMarkLight,
|
|
87
|
+
C as GardenLogoText,
|
|
88
|
+
s as GardenStrokeIcon,
|
|
89
|
+
wo as HyperliquidLogoFull,
|
|
90
|
+
Xo as JumperLogoFull,
|
|
91
|
+
yo as LiFiLogoFull,
|
|
92
|
+
Oo as LightsparkLogoFull,
|
|
93
|
+
qo as LitecoinLogoFull,
|
|
94
|
+
Ko as MaestroLogoFull,
|
|
95
|
+
Vo as MegaEthLogoFull,
|
|
96
|
+
zo as MonadLogoFull,
|
|
97
|
+
Uo as MulticoinCapitalLogoFull,
|
|
98
|
+
fo as NFTIcon,
|
|
66
99
|
Y as PancakeSwap,
|
|
67
|
-
|
|
68
|
-
|
|
100
|
+
M as PhantomIcon,
|
|
101
|
+
Zo as PhantomLogoFull,
|
|
102
|
+
b as PolygonLogo,
|
|
69
103
|
eo as Radiant,
|
|
70
|
-
|
|
104
|
+
D as RadiantLogo,
|
|
105
|
+
$o as RangoLogoFull,
|
|
106
|
+
ar as SatsTerminalLogoFull,
|
|
107
|
+
rr as SolanaLogoFull,
|
|
71
108
|
Q as Solv,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
109
|
+
tr as StarknetLogoFull,
|
|
110
|
+
pr as SwapKitLogoFull,
|
|
111
|
+
v as SwellBTC,
|
|
112
|
+
W as TraderJoe,
|
|
113
|
+
A as TrailOfBits,
|
|
114
|
+
P as TrustWallet,
|
|
76
115
|
oo as Vertex,
|
|
77
|
-
|
|
116
|
+
R as WalletConnect,
|
|
117
|
+
xr as XverseLogoFull
|
|
78
118
|
};
|
|
@@ -1,23 +1,41 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
type OpacityVariants = "extra-light" | "light" | "medium" | "semi-dark" | "full";
|
|
4
|
+
/** Desktop Modal config. Defaults: dimmed overlay, closes on outside
|
|
5
|
+
* click, X shown, page scroll-locked. */
|
|
6
|
+
export type DesktopModalConfig = {
|
|
7
|
+
/** Classes for the modal card. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Classes for the full-screen overlay */
|
|
10
|
+
overlayClassName?: string;
|
|
11
|
+
/** When `true`, force a choice — hide the close (X) button AND don't close on
|
|
12
|
+
* outside click. */
|
|
13
|
+
preventClose?: boolean;
|
|
14
|
+
/** When `true`, the page is NOT scroll-locked while open. */
|
|
15
|
+
disableScrollLock?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** Mobile BottomSheet config. Defaults: dim backdrop, dismissible
|
|
18
|
+
* by tap-outside / drag, page behind blocked, scroll-locked. */
|
|
19
|
+
export type MobileBottomSheetConfig = {
|
|
20
|
+
/** Classes for the sheet content panel. */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Classes for the backdrop */
|
|
23
|
+
overlayClassName?: string;
|
|
24
|
+
/** When `true`, the sheet can't be dismissed by tap-outside / drag — force a choice. */
|
|
25
|
+
preventClose?: boolean;
|
|
26
|
+
/** When `true`, the page behind the sheet stays interactive. */
|
|
27
|
+
allowBackgroundInteraction?: boolean;
|
|
28
|
+
/** When `true`, the page is NOT scroll-locked while open. */
|
|
29
|
+
disableScrollLock?: boolean;
|
|
30
|
+
};
|
|
4
31
|
export type ResponsiveModalProps = {
|
|
5
32
|
open: boolean;
|
|
6
33
|
onClose: () => void;
|
|
7
34
|
label?: string;
|
|
8
35
|
children: ReactNode;
|
|
9
36
|
opacityLevel?: OpacityVariants;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* the mobile BottomSheet non-dismissible (no tap-outside / drag-to-close). */
|
|
13
|
-
hideCloseBtn?: boolean;
|
|
14
|
-
/** Extra classes for the overlay/backdrop — desktop Modal and mobile
|
|
15
|
-
* BottomSheet alike */
|
|
16
|
-
overlayClassName?: string;
|
|
17
|
-
/** Mobile BottomSheet only. When `true`, the page behind stays interactive. Default `false`. */
|
|
18
|
-
bottomSheetAllowBackgroundInteraction?: boolean;
|
|
19
|
-
/** When `true`, the page is NOT scroll-locked while open. */
|
|
20
|
-
disableScrollLock?: boolean;
|
|
37
|
+
desktopModal?: DesktopModalConfig;
|
|
38
|
+
mobileBottomSheet?: MobileBottomSheetConfig;
|
|
21
39
|
};
|
|
22
40
|
/** Modal on desktop, vaul BottomSheet on mobile. Reads viewport from `ViewportProvider`. Portals into `document.body`. */
|
|
23
41
|
export declare const ResponsiveModal: FC<ResponsiveModalProps>;
|
|
@@ -1,77 +1,76 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { Modal as
|
|
5
|
-
import { BottomSheet as
|
|
6
|
-
import { Typography as
|
|
7
|
-
import { CloseIcon as
|
|
8
|
-
import { useViewport as
|
|
9
|
-
import { cn as
|
|
10
|
-
const
|
|
11
|
-
open:
|
|
12
|
-
onClose:
|
|
13
|
-
label:
|
|
14
|
-
children:
|
|
15
|
-
opacityLevel:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
overlayClassName: m,
|
|
19
|
-
bottomSheetAllowBackgroundInteraction: p,
|
|
20
|
-
disableScrollLock: u
|
|
1
|
+
import { jsx as c, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useEffect as L } from "react";
|
|
3
|
+
import { createPortal as a } from "react-dom";
|
|
4
|
+
import { Modal as v } from "../Modal/index.js";
|
|
5
|
+
import { BottomSheet as j } from "../BottomSheet/index.js";
|
|
6
|
+
import { Typography as I } from "../Typography/index.js";
|
|
7
|
+
import { CloseIcon as C } from "../Icons/CloseIcon.js";
|
|
8
|
+
import { useViewport as z } from "../Viewport/index.js";
|
|
9
|
+
import { cn as E } from "../utils/index.js";
|
|
10
|
+
const H = ({
|
|
11
|
+
open: i,
|
|
12
|
+
onClose: n,
|
|
13
|
+
label: s,
|
|
14
|
+
children: g,
|
|
15
|
+
opacityLevel: N = "medium",
|
|
16
|
+
desktopModal: r,
|
|
17
|
+
mobileBottomSheet: f
|
|
21
18
|
}) => {
|
|
22
|
-
const
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
}, []),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
19
|
+
const w = z() === "mobile", [x, y] = l(!1);
|
|
20
|
+
return L(() => {
|
|
21
|
+
y(!0);
|
|
22
|
+
}, []), x ? w ? i ? a(
|
|
23
|
+
/* @__PURE__ */ c(
|
|
24
|
+
j,
|
|
28
25
|
{
|
|
29
|
-
open:
|
|
30
|
-
onOpenChange:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
open: i,
|
|
27
|
+
onOpenChange: n,
|
|
28
|
+
className: f == null ? void 0 : f.className,
|
|
29
|
+
overlayClassName: f == null ? void 0 : f.overlayClassName,
|
|
30
|
+
dismissible: !(f != null && f.preventClose),
|
|
31
|
+
modal: !(f != null && f.allowBackgroundInteraction),
|
|
32
|
+
disableScrollLock: f == null ? void 0 : f.disableScrollLock,
|
|
33
|
+
children: g
|
|
35
34
|
}
|
|
36
35
|
),
|
|
37
36
|
document.body
|
|
38
|
-
) : null :
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
37
|
+
) : null : a(
|
|
38
|
+
/* @__PURE__ */ c(
|
|
39
|
+
v,
|
|
41
40
|
{
|
|
42
|
-
open:
|
|
43
|
-
onClose: r,
|
|
44
|
-
overlayClassName:
|
|
45
|
-
disableScrollLock:
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
-
|
|
41
|
+
open: i,
|
|
42
|
+
onClose: r != null && r.preventClose ? void 0 : n,
|
|
43
|
+
overlayClassName: r == null ? void 0 : r.overlayClassName,
|
|
44
|
+
disableScrollLock: r == null ? void 0 : r.disableScrollLock,
|
|
45
|
+
children: /* @__PURE__ */ u(
|
|
46
|
+
v.Children,
|
|
48
47
|
{
|
|
49
|
-
opacityLevel:
|
|
50
|
-
className:
|
|
48
|
+
opacityLevel: N,
|
|
49
|
+
className: E(
|
|
51
50
|
"gf-relative gf-flex gf-w-[500px] gf-flex-col gf-gap-4 gf-rounded-2xl gf-p-4",
|
|
52
|
-
|
|
51
|
+
r == null ? void 0 : r.className
|
|
53
52
|
),
|
|
54
53
|
children: [
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
!
|
|
58
|
-
|
|
54
|
+
s && /* @__PURE__ */ u("div", { className: "gf-flex gf-items-center gf-justify-between", children: [
|
|
55
|
+
/* @__PURE__ */ c(I, { size: "h4", weight: "medium", children: s }),
|
|
56
|
+
!(r != null && r.preventClose) && /* @__PURE__ */ c(
|
|
57
|
+
C,
|
|
59
58
|
{
|
|
60
59
|
className: "gf-h-3 gf-w-3 gf-fill-primaryIris gf-cursor-pointer",
|
|
61
|
-
onClick:
|
|
60
|
+
onClick: n
|
|
62
61
|
}
|
|
63
62
|
)
|
|
64
63
|
] }),
|
|
65
|
-
!
|
|
64
|
+
!s && !(r != null && r.preventClose) && /* @__PURE__ */ c(
|
|
66
65
|
"button",
|
|
67
66
|
{
|
|
68
|
-
onClick:
|
|
67
|
+
onClick: n,
|
|
69
68
|
className: "gf-absolute gf-right-4 gf-top-4 gf-cursor-pointer gf-text-white/50 gf-transition-colors hover:gf-text-white",
|
|
70
69
|
"aria-label": "Close",
|
|
71
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ c(C, { className: "gf-h-4 gf-w-4" })
|
|
72
71
|
}
|
|
73
72
|
),
|
|
74
|
-
|
|
73
|
+
g
|
|
75
74
|
]
|
|
76
75
|
}
|
|
77
76
|
)
|
|
@@ -81,5 +80,5 @@ const V = ({
|
|
|
81
80
|
) : null;
|
|
82
81
|
};
|
|
83
82
|
export {
|
|
84
|
-
|
|
83
|
+
H as ResponsiveModal
|
|
85
84
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export type SizeVariants = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
2
2
|
export type WeightVariants = "thin" | "light" | "regular" | "medium" | "semibold" | "bold" | "heavy" | "black";
|
|
3
|
-
type
|
|
3
|
+
export type ColorVariants = "near-black" | "graphite" | "neutral-grey" | "mist" | "rose" | "white";
|
|
4
|
+
type BreakpointVariants = "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
5
|
type Breakpoints = {
|
|
5
|
-
[K in
|
|
6
|
+
[K in BreakpointVariants]?: SizeVariants;
|
|
6
7
|
};
|
|
7
8
|
type BaseTypographyProps = {
|
|
8
9
|
size?: SizeVariants;
|
|
9
10
|
weight?: WeightVariants;
|
|
11
|
+
color?: ColorVariants;
|
|
10
12
|
breakpoints?: Breakpoints;
|
|
11
13
|
as?: "div" | "span" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "a" | "cite";
|
|
12
14
|
};
|
|
@@ -25,11 +27,12 @@ type TypographyProps = BaseTypographyProps & ((React.HTMLAttributes<HTMLDivEleme
|
|
|
25
27
|
}));
|
|
26
28
|
/**
|
|
27
29
|
* Typography component
|
|
28
|
-
* @param size -
|
|
30
|
+
* @param size - size of the text => "h1" | "h2" | "h3" | "h4" | "h5" | "h6"
|
|
29
31
|
* @param weight - weight of the text => "thin" | "light" | "regular" | "medium" | "semibold" | "bold" | "heavy" | "black"
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @
|
|
32
|
+
* @param color - text color token => "near-black" | "graphite" | "neutral-grey" | "mist" | "rose" | "white"
|
|
33
|
+
* @param breakpoints - per-breakpoint size overrides => { [key in "xs" | "sm" | "md" | "lg" | "xl"]?: SizeVariants }
|
|
34
|
+
* @param as - HTML element to render as => "div" | "span" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "a" | "cite"
|
|
35
|
+
* @default size - "h3" weight - "regular" color - "near-black" as - "span"
|
|
33
36
|
*/
|
|
34
37
|
export declare const Typography: React.FC<TypographyProps>;
|
|
35
38
|
export {};
|
package/dist/Typography/index.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { cva as m } from "class-variance-authority";
|
|
3
3
|
import { cn as h } from "../utils/index.js";
|
|
4
|
-
const
|
|
4
|
+
const p = m(["gf-font-haffer gf-not-italic"], {
|
|
5
5
|
variants: {
|
|
6
|
+
color: {
|
|
7
|
+
"near-black": "gf-text-near-black",
|
|
8
|
+
graphite: "gf-text-graphite",
|
|
9
|
+
"neutral-grey": "gf-text-neutral-grey",
|
|
10
|
+
mist: "gf-text-mist",
|
|
11
|
+
rose: "gf-text-rose",
|
|
12
|
+
white: "gf-text-white"
|
|
13
|
+
},
|
|
6
14
|
size: {
|
|
7
15
|
h1: "gf-text-[32px] gf-leading-[40px]",
|
|
8
16
|
h2: "gf-text-xl gf-leading-[20px]",
|
|
@@ -20,70 +28,72 @@ const e = m(["gf-font-haffer gf-text-dark-grey not-italic"], {
|
|
|
20
28
|
bold: "gf-font-bold",
|
|
21
29
|
heavy: "gf-font-heavy",
|
|
22
30
|
black: "gf-font-black"
|
|
23
|
-
},
|
|
24
|
-
breakpointSize: {
|
|
25
|
-
"xs:h1": "xs:gf-text-[32px] xs:gf-leading-[48px]",
|
|
26
|
-
"xs:h2": "xs:gf-text-xl xs:gf-leading-7",
|
|
27
|
-
"xs:h3": "xs:gf-text-base xs:gf-leading-6",
|
|
28
|
-
"xs:h4": "xs:gf-text-sm xs:gf-leading-5",
|
|
29
|
-
"xs:h5": "xs:gf-text-xs xs:gf-leading-4",
|
|
30
|
-
"xs:h6": "xs:gf-text-[10px] xs:gf-leading-3",
|
|
31
|
-
"sm:h1": "sm:gf-text-[32px] sm:gf-leading-[48px]",
|
|
32
|
-
"sm:h2": "sm:gf-text-xl sm:gf-leading-7",
|
|
33
|
-
"sm:h3": "sm:gf-text-base sm:gf-leading-6",
|
|
34
|
-
"sm:h4": "sm:gf-text-sm sm:gf-leading-5",
|
|
35
|
-
"sm:h5": "sm:gf-text-xs sm:gf-leading-4",
|
|
36
|
-
"sm:h6": "sm:gf-text-[10px] sm:gf-leading-3",
|
|
37
|
-
"md:h1": "md:gf-text-[32px] md:gf-leading-[48px]",
|
|
38
|
-
"md:h2": "md:gf-text-xl md:gf-leading-7",
|
|
39
|
-
"md:h3": "md:gf-text-base md:gf-leading-6",
|
|
40
|
-
"md:h4": "md:gf-text-sm md:gf-leading-5",
|
|
41
|
-
"md:h5": "md:gf-text-xs md:gf-leading-4",
|
|
42
|
-
"md:h6": "md:gf-text-[10px] md:gf-leading-3",
|
|
43
|
-
"lg:h1": "lg:gf-text-[32px] lg:gf-leading-[48px]",
|
|
44
|
-
"lg:h2": "lg:gf-text-xl lg:gf-leading-7",
|
|
45
|
-
"lg:h3": "lg:gf-text-base lg:gf-leading-6",
|
|
46
|
-
"lg:h4": "lg:gf-text-sm lg:gf-leading-5",
|
|
47
|
-
"lg:h5": "lg:gf-text-xs lg:gf-leading-4",
|
|
48
|
-
"lg:h6": "lg:gf-text-[10px] lg:gf-leading-3",
|
|
49
|
-
"xl:h1": "xl:gf-text-[32px] xl:gf-leading-[48px]",
|
|
50
|
-
"xl:h2": "xl:gf-text-xl xl:gf-leading-7",
|
|
51
|
-
"xl:h3": "xl:gf-text-base xl:gf-leading-6",
|
|
52
|
-
"xl:h4": "xl:gf-text-sm xl:gf-leading-5",
|
|
53
|
-
"xl:h5": "xl:gf-text-xs xl:gf-leading-4",
|
|
54
|
-
"xl:h6": "xl:gf-text-[10px] xl:gf-leading-3"
|
|
55
|
-
},
|
|
56
|
-
defaultVariants: {
|
|
57
|
-
size: "h3",
|
|
58
|
-
weight: "medium"
|
|
59
31
|
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
size: "h3",
|
|
35
|
+
weight: "regular",
|
|
36
|
+
color: "near-black"
|
|
60
37
|
}
|
|
61
|
-
}),
|
|
38
|
+
}), o = {
|
|
39
|
+
"xs:h1": "xs:gf-text-[32px] xs:gf-leading-[48px]",
|
|
40
|
+
"xs:h2": "xs:gf-text-xl xs:gf-leading-7",
|
|
41
|
+
"xs:h3": "xs:gf-text-base xs:gf-leading-6",
|
|
42
|
+
"xs:h4": "xs:gf-text-sm xs:gf-leading-5",
|
|
43
|
+
"xs:h5": "xs:gf-text-xs xs:gf-leading-4",
|
|
44
|
+
"xs:h6": "xs:gf-text-[10px] xs:gf-leading-3",
|
|
45
|
+
"sm:h1": "sm:gf-text-[32px] sm:gf-leading-[48px]",
|
|
46
|
+
"sm:h2": "sm:gf-text-xl sm:gf-leading-7",
|
|
47
|
+
"sm:h3": "sm:gf-text-base sm:gf-leading-6",
|
|
48
|
+
"sm:h4": "sm:gf-text-sm sm:gf-leading-5",
|
|
49
|
+
"sm:h5": "sm:gf-text-xs sm:gf-leading-4",
|
|
50
|
+
"sm:h6": "sm:gf-text-[10px] sm:gf-leading-3",
|
|
51
|
+
"md:h1": "md:gf-text-[32px] md:gf-leading-[48px]",
|
|
52
|
+
"md:h2": "md:gf-text-xl md:gf-leading-7",
|
|
53
|
+
"md:h3": "md:gf-text-base md:gf-leading-6",
|
|
54
|
+
"md:h4": "md:gf-text-sm md:gf-leading-5",
|
|
55
|
+
"md:h5": "md:gf-text-xs md:gf-leading-4",
|
|
56
|
+
"md:h6": "md:gf-text-[10px] md:gf-leading-3",
|
|
57
|
+
"lg:h1": "lg:gf-text-[32px] lg:gf-leading-[48px]",
|
|
58
|
+
"lg:h2": "lg:gf-text-xl lg:gf-leading-7",
|
|
59
|
+
"lg:h3": "lg:gf-text-base lg:gf-leading-6",
|
|
60
|
+
"lg:h4": "lg:gf-text-sm lg:gf-leading-5",
|
|
61
|
+
"lg:h5": "lg:gf-text-xs lg:gf-leading-4",
|
|
62
|
+
"lg:h6": "lg:gf-text-[10px] lg:gf-leading-3",
|
|
63
|
+
"xl:h1": "xl:gf-text-[32px] xl:gf-leading-[48px]",
|
|
64
|
+
"xl:h2": "xl:gf-text-xl xl:gf-leading-7",
|
|
65
|
+
"xl:h3": "xl:gf-text-base xl:gf-leading-6",
|
|
66
|
+
"xl:h4": "xl:gf-text-sm xl:gf-leading-5",
|
|
67
|
+
"xl:h5": "xl:gf-text-xs xl:gf-leading-4",
|
|
68
|
+
"xl:h6": "xl:gf-text-[10px] xl:gf-leading-3"
|
|
69
|
+
}, u = ({
|
|
62
70
|
as: t = "span",
|
|
63
|
-
size:
|
|
64
|
-
weight:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
size: e,
|
|
72
|
+
weight: x,
|
|
73
|
+
color: f,
|
|
74
|
+
breakpoints: g,
|
|
75
|
+
className: l,
|
|
76
|
+
...s
|
|
68
77
|
}) => {
|
|
69
|
-
const
|
|
70
|
-
(
|
|
78
|
+
const a = g ? Object.entries(g).map(
|
|
79
|
+
([i, n]) => o[`${i}:${n}`]
|
|
71
80
|
).join(" ") : "";
|
|
72
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ d(
|
|
73
82
|
t,
|
|
74
83
|
{
|
|
75
84
|
className: h(
|
|
76
|
-
|
|
77
|
-
size:
|
|
78
|
-
weight:
|
|
79
|
-
|
|
85
|
+
p({
|
|
86
|
+
size: e,
|
|
87
|
+
weight: x,
|
|
88
|
+
color: f,
|
|
89
|
+
className: l
|
|
80
90
|
}),
|
|
81
|
-
|
|
91
|
+
a
|
|
82
92
|
),
|
|
83
|
-
...
|
|
93
|
+
...s
|
|
84
94
|
}
|
|
85
95
|
);
|
|
86
96
|
};
|
|
87
97
|
export {
|
|
88
|
-
|
|
98
|
+
u as Typography
|
|
89
99
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
|
|
2
2
|
export * from './animations';
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
23
|
-
export * from './
|
|
24
|
-
export * from './
|
|
25
|
-
export * from './
|
|
26
|
-
export * from './
|
|
27
|
-
export * from './
|
|
28
|
-
export * from './
|
|
29
|
-
export * from './
|
|
30
|
-
export * from './
|
|
31
|
-
export * from './
|
|
32
|
-
export * from './
|
|
33
|
-
export * from './
|
|
34
|
-
export * from './
|
|
35
|
-
export * from './
|
|
36
|
-
export * from './
|
|
37
|
-
export * from './
|
|
38
|
-
export * from './
|
|
39
|
-
export * from './
|
|
40
|
-
export * from './
|
|
41
|
-
export * from './
|
|
42
|
-
export * from './
|
|
43
|
-
export * from './
|
|
44
|
-
export * from './
|
|
45
|
-
export * from './
|
|
46
|
-
export * from './
|
|
3
|
+
export * from './Typography';
|
|
4
|
+
export * from './Button';
|
|
5
|
+
export * from './Checkbox';
|
|
6
|
+
export * from './BottomSheet';
|
|
7
|
+
export * from './Container';
|
|
8
|
+
export * from './Icons';
|
|
9
|
+
export * from './Logo';
|
|
10
|
+
export * from './Modal';
|
|
11
|
+
export * from './Opacity';
|
|
12
|
+
export * from './Sidebar';
|
|
13
|
+
export * from './ClientOnly';
|
|
14
|
+
export * from './Input';
|
|
15
|
+
export * from './Field';
|
|
16
|
+
export * from './StatCard';
|
|
17
|
+
export * from './ToggleGroup';
|
|
18
|
+
export * from './Pagination';
|
|
19
|
+
export * from './HamburgerIcon';
|
|
20
|
+
export * from './BulletList';
|
|
21
|
+
export * from './Portal';
|
|
22
|
+
export * from './Viewport';
|
|
23
|
+
export * from './Chip';
|
|
24
|
+
export * from './GradientScroll';
|
|
25
|
+
export * from './InfoBadge';
|
|
26
|
+
export * from './TokenInfo';
|
|
27
|
+
export * from './TokenNetworkLogos';
|
|
28
|
+
export * from './StatusChip';
|
|
29
|
+
export * from './StateContainer';
|
|
30
|
+
export * from './EmptyState';
|
|
31
|
+
export * from './ErrorState';
|
|
32
|
+
export * from './InfoTooltip';
|
|
33
|
+
export * from './SelectDropdown';
|
|
34
|
+
export * from './ResponsiveModal';
|
|
35
|
+
export * from './Toast';
|
|
36
|
+
export * from './BlogCard';
|
|
37
|
+
export * from './Footer';
|
|
38
|
+
export * from './QuestCard';
|
|
39
|
+
export * from './DataTable';
|
|
40
|
+
export * from './CardList';
|
|
41
|
+
export * from './DashboardLayout';
|
|
42
|
+
export * from './CookieConsent';
|
|
43
|
+
export * from './OTPInput';
|
|
44
|
+
export * from './DirectionalIconHover';
|
|
45
|
+
export * from './Skeleton';
|
|
46
|
+
export * from './Switch';
|