@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.
Files changed (74) hide show
  1. package/dist/BottomSheet/BottomSheet.d.ts +4 -0
  2. package/dist/BottomSheet/index.js +38 -26
  3. package/dist/Button/index.js +6 -6
  4. package/dist/CookieConsent/CookieConsent.d.ts +7 -0
  5. package/dist/CookieConsent/CookieConsent.js +61 -37
  6. package/dist/CookieConsent/CookieConsentNotice.js +13 -14
  7. package/dist/CookieConsent/CookieConsentPreferences.js +17 -17
  8. package/dist/CookieConsent/store.js +19 -19
  9. package/dist/CookieConsent/utils.d.ts +8 -0
  10. package/dist/CookieConsent/utils.js +41 -25
  11. package/dist/DashboardLayout/DashboardSidebar.js +5 -5
  12. package/dist/DashboardLayout/MobileMenu.js +74 -66
  13. package/dist/Footer/Footer.d.ts +34 -0
  14. package/dist/Footer/FooterLink.d.ts +1 -0
  15. package/dist/Footer/FooterLink.js +14 -8
  16. package/dist/Footer/index.js +249 -189
  17. package/dist/Icons/BugReportIcon.d.ts +5 -0
  18. package/dist/Icons/BugReportIcon.js +16 -0
  19. package/dist/Icons/SecurityVerifiedIcon.d.ts +5 -0
  20. package/dist/Icons/SecurityVerifiedIcon.js +22 -0
  21. package/dist/Icons/YoutubeIcon.js +2 -2
  22. package/dist/Icons/index.d.ts +2 -0
  23. package/dist/Icons/index.js +66 -62
  24. package/dist/Logo/AmberLogoFull.d.ts +5 -0
  25. package/dist/Logo/AmberLogoFull.js +25 -0
  26. package/dist/Logo/ArbitrumLogoFull.d.ts +5 -0
  27. package/dist/Logo/ArbitrumLogoFull.js +122 -0
  28. package/dist/Logo/BaseLogoFull.d.ts +5 -0
  29. package/dist/Logo/BaseLogoFull.js +34 -0
  30. package/dist/Logo/BnbChainLogoFull.d.ts +5 -0
  31. package/dist/Logo/BnbChainLogoFull.js +83 -0
  32. package/dist/Logo/HyperliquidLogoFull.d.ts +5 -0
  33. package/dist/Logo/HyperliquidLogoFull.js +104 -0
  34. package/dist/Logo/JumperLogoFull.d.ts +5 -0
  35. package/dist/Logo/JumperLogoFull.js +77 -0
  36. package/dist/Logo/LiFiLogoFull.d.ts +5 -0
  37. package/dist/Logo/LiFiLogoFull.js +43 -0
  38. package/dist/Logo/LightsparkLogoFull.d.ts +5 -0
  39. package/dist/Logo/LightsparkLogoFull.js +56 -0
  40. package/dist/Logo/LitecoinLogoFull.d.ts +5 -0
  41. package/dist/Logo/LitecoinLogoFull.js +97 -0
  42. package/dist/Logo/MaestroLogoFull.d.ts +5 -0
  43. package/dist/Logo/MaestroLogoFull.js +31 -0
  44. package/dist/Logo/MegaEthLogoFull.d.ts +5 -0
  45. package/dist/Logo/MegaEthLogoFull.js +94 -0
  46. package/dist/Logo/MonadLogoFull.d.ts +5 -0
  47. package/dist/Logo/MonadLogoFull.js +62 -0
  48. package/dist/Logo/MulticoinCapitalLogoFull.d.ts +5 -0
  49. package/dist/Logo/MulticoinCapitalLogoFull.js +154 -0
  50. package/dist/Logo/PhantomLogoFull.d.ts +5 -0
  51. package/dist/Logo/PhantomLogoFull.js +76 -0
  52. package/dist/Logo/RangoLogoFull.d.ts +5 -0
  53. package/dist/Logo/RangoLogoFull.js +168 -0
  54. package/dist/Logo/SatsTerminalLogoFull.d.ts +5 -0
  55. package/dist/Logo/SatsTerminalLogoFull.js +81 -0
  56. package/dist/Logo/SolanaLogoFull.d.ts +5 -0
  57. package/dist/Logo/SolanaLogoFull.js +84 -0
  58. package/dist/Logo/StarknetLogoFull.d.ts +5 -0
  59. package/dist/Logo/StarknetLogoFull.js +141 -0
  60. package/dist/Logo/SwapKitLogoFull.d.ts +5 -0
  61. package/dist/Logo/SwapKitLogoFull.js +97 -0
  62. package/dist/Logo/XverseLogoFull.d.ts +5 -0
  63. package/dist/Logo/XverseLogoFull.js +99 -0
  64. package/dist/Logo/index.d.ts +20 -0
  65. package/dist/Logo/index.js +94 -54
  66. package/dist/ResponsiveModal/ResponsiveModal.d.ts +29 -11
  67. package/dist/ResponsiveModal/index.js +53 -54
  68. package/dist/Typography/Typography.d.ts +9 -6
  69. package/dist/Typography/index.js +64 -54
  70. package/dist/index.d.ts +44 -44
  71. package/dist/index.js +370 -326
  72. package/dist/style.css +1 -1
  73. package/dist/utils/index.js +27 -4
  74. package/package.json +1 -1
@@ -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 p } from "./CatalogLogo.js";
4
- import { Coinbase as a } from "./Coinbase.js";
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 L } from "./GardenExplorer.js";
7
- import { GardenFullLogo as G } from "./GardenFullLogo.js";
8
- import { GardenLogo as C } from "./GardenLogo.js";
9
- import { GardenLogoText as T } from "./GardenLogoText.js";
10
- import { GardenStrokeIcon as D } from "./GardenStrokeIcon.js";
11
- import { GMXLogo as I } from "./GMXLogo.js";
12
- import { PhantomIcon as s } from "./PhantomIcon.js";
13
- import { PolygonLogo as M } from "./PolygonLogo.js";
14
- import { RadiantLogo as b } from "./RadiantLogo.js";
15
- import { TrailOfBits as P } from "./TrailOfBits.js";
16
- import { TrustWallet as A } from "./TrustWallet.js";
17
- import { WalletConnect as O } from "./WalletConnect.js";
18
- import { SwellBTC as W } from "./SwellBTC.js";
19
- import { DLCBTC as v } from "./DLCBTC.js";
20
- import { TraderJoe as J } from "./TraderJoe.js";
21
- import { Debridge as V } from "./Debridge.js";
22
- import { Camelot as q } from "./Camelot.js";
23
- import { GMX as H } from "./GMX.js";
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 po } from "./GardenIconOutline.js";
31
- import { NFTIcon as ao } from "./NFTIcon.js";
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 lo } from "./GardenDocs.js";
33
+ import { GardenDocs as no } from "./GardenDocs.js";
34
34
  import { GardenLogoMarkDark as io } from "./GardenLogoMarkDark.js";
35
- import { GardenLogoMarkLight as co } from "./GardenLogoMarkLight.js";
36
- import { GardenLogoDark as ko } from "./GardenLogoDark.js";
37
- import { GardenLogoLight as uo } from "./GardenLogoLight.js";
38
- import { Code4renaLogo as ho } from "./Code4renaLogo.js";
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
- q as Camelot,
43
- p as CatalogLogo,
44
- ho as Code4renaLogo,
45
- a as Coinbase,
46
- v as DLCBTC,
47
- V as Debridge,
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
- H as GMX,
51
- I as GMXLogo,
52
- lo as GardenDocs,
53
- L as GardenExplorer,
74
+ j as GMX,
75
+ h as GMXLogo,
76
+ no as GardenDocs,
77
+ n as GardenExplorer,
54
78
  go as GardenExplorerAlt,
55
- G as GardenFullLogo,
79
+ i as GardenFullLogo,
56
80
  mo as GardenIcon,
57
- po as GardenIconOutline,
58
- C as GardenLogo,
59
- ko as GardenLogoDark,
60
- uo as GardenLogoLight,
81
+ lo as GardenIconOutline,
82
+ d as GardenLogo,
83
+ co as GardenLogoDark,
84
+ To as GardenLogoLight,
61
85
  io as GardenLogoMarkDark,
62
- co as GardenLogoMarkLight,
63
- T as GardenLogoText,
64
- D as GardenStrokeIcon,
65
- ao as NFTIcon,
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
- s as PhantomIcon,
68
- M as PolygonLogo,
100
+ M as PhantomIcon,
101
+ Zo as PhantomLogoFull,
102
+ b as PolygonLogo,
69
103
  eo as Radiant,
70
- b as RadiantLogo,
104
+ D as RadiantLogo,
105
+ $o as RangoLogoFull,
106
+ ar as SatsTerminalLogoFull,
107
+ rr as SolanaLogoFull,
71
108
  Q as Solv,
72
- W as SwellBTC,
73
- J as TraderJoe,
74
- P as TrailOfBits,
75
- A as TrustWallet,
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
- O as WalletConnect
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
- className?: string;
11
- /** Hide the close (X) button — for modals that must force a choice. Also makes
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 e, jsxs as s } from "react/jsx-runtime";
2
- import { useState as x, useEffect as b } from "react";
3
- import { createPortal as g } from "react-dom";
4
- import { Modal as n } from "../Modal/index.js";
5
- import { BottomSheet as v } from "../BottomSheet/index.js";
6
- import { Typography as y } from "../Typography/index.js";
7
- import { CloseIcon as l } from "../Icons/CloseIcon.js";
8
- import { useViewport as M } from "../Viewport/index.js";
9
- import { cn as N } from "../utils/index.js";
10
- const V = ({
11
- open: t,
12
- onClose: r,
13
- label: o,
14
- children: f,
15
- opacityLevel: c = "medium",
16
- className: a,
17
- hideCloseBtn: i,
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 d = M() === "mobile", [h, w] = x(!1);
23
- return b(() => {
24
- w(!0);
25
- }, []), h ? d ? t ? g(
26
- /* @__PURE__ */ e(
27
- v,
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: t,
30
- onOpenChange: r,
31
- overlayClassName: m,
32
- dismissible: !i,
33
- modal: !p,
34
- children: f
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 : g(
39
- /* @__PURE__ */ e(
40
- n,
37
+ ) : null : a(
38
+ /* @__PURE__ */ c(
39
+ v,
41
40
  {
42
- open: t,
43
- onClose: r,
44
- overlayClassName: m,
45
- disableScrollLock: u,
46
- children: /* @__PURE__ */ s(
47
- n.Children,
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: c,
50
- className: N(
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
- a
51
+ r == null ? void 0 : r.className
53
52
  ),
54
53
  children: [
55
- o && /* @__PURE__ */ s("div", { className: "gf-flex gf-items-center gf-justify-between", children: [
56
- /* @__PURE__ */ e(y, { size: "h4", weight: "medium", children: o }),
57
- !i && /* @__PURE__ */ e(
58
- l,
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: r
60
+ onClick: n
62
61
  }
63
62
  )
64
63
  ] }),
65
- !o && !i && /* @__PURE__ */ e(
64
+ !s && !(r != null && r.preventClose) && /* @__PURE__ */ c(
66
65
  "button",
67
66
  {
68
- onClick: r,
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__ */ e(l, { className: "gf-h-4 gf-w-4" })
70
+ children: /* @__PURE__ */ c(C, { className: "gf-h-4 gf-w-4" })
72
71
  }
73
72
  ),
74
- f
73
+ g
75
74
  ]
76
75
  }
77
76
  )
@@ -81,5 +80,5 @@ const V = ({
81
80
  ) : null;
82
81
  };
83
82
  export {
84
- V as ResponsiveModal
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 breakpointVariants = "xs" | "sm" | "md" | "lg" | "xl";
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 breakpointVariants]?: SizeVariants;
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 - default size of the text => "h1" | "h2" | "h3" | "h4" | "h5" | "h6"
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 breakpoints - Breakpoints for the text size => { [key in ["xs","sm","md","lg","xl"]]: SizeVariants }
31
- * @param as -HTML element to render as => "div" | "span" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "a" | "cite"
32
- * @default size - "h3" weight - "medium" as - "span"
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 {};
@@ -1,8 +1,16 @@
1
- import { jsx as n } from "react/jsx-runtime";
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 e = m(["gf-font-haffer gf-text-dark-grey not-italic"], {
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
- }), b = ({
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: f,
64
- weight: l = "regular",
65
- breakpoints: x,
66
- className: s,
67
- ...a
71
+ size: e,
72
+ weight: x,
73
+ color: f,
74
+ breakpoints: g,
75
+ className: l,
76
+ ...s
68
77
  }) => {
69
- const d = x ? Object.entries(x).map(([g, i]) => `${g}:${i}`).map(
70
- (g) => e({ breakpointSize: g })
78
+ const a = g ? Object.entries(g).map(
79
+ ([i, n]) => o[`${i}:${n}`]
71
80
  ).join(" ") : "";
72
- return /* @__PURE__ */ n(
81
+ return /* @__PURE__ */ d(
73
82
  t,
74
83
  {
75
84
  className: h(
76
- e({
77
- size: f,
78
- weight: l,
79
- className: s
85
+ p({
86
+ size: e,
87
+ weight: x,
88
+ color: f,
89
+ className: l
80
90
  }),
81
- d
91
+ a
82
92
  ),
83
- ...a
93
+ ...s
84
94
  }
85
95
  );
86
96
  };
87
97
  export {
88
- b as Typography
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 './components/atoms/Typography';
4
- export * from './components/atoms/Button';
5
- export * from './components/atoms/Checkbox';
6
- export * from './components/atoms/BottomSheet';
7
- export * from './components/atoms/Container';
8
- export * from './components/atoms/Icons';
9
- export * from './components/atoms/Logo';
10
- export * from './components/atoms/Modal';
11
- export * from './components/atoms/Opacity';
12
- export * from './components/atoms/Sidebar';
13
- export * from './components/atoms/ClientOnly';
14
- export * from './components/atoms/Input';
15
- export * from './components/atoms/Field';
16
- export * from './components/atoms/StatCard';
17
- export * from './components/atoms/ToggleGroup';
18
- export * from './components/atoms/Pagination';
19
- export * from './components/atoms/HamburgerIcon';
20
- export * from './components/atoms/BulletList';
21
- export * from './components/atoms/Portal';
22
- export * from './components/atoms/Viewport';
23
- export * from './components/molecules/Chip';
24
- export * from './components/molecules/GradientScroll';
25
- export * from './components/molecules/InfoBadge';
26
- export * from './components/molecules/TokenInfo';
27
- export * from './components/molecules/TokenNetworkLogos';
28
- export * from './components/molecules/StatusChip';
29
- export * from './components/molecules/StateContainer';
30
- export * from './components/molecules/EmptyState';
31
- export * from './components/molecules/ErrorState';
32
- export * from './components/molecules/InfoTooltip';
33
- export * from './components/molecules/SelectDropdown';
34
- export * from './components/molecules/ResponsiveModal';
35
- export * from './components/molecules/Toast';
36
- export * from './components/organisms/BlogCard';
37
- export * from './components/organisms/Footer';
38
- export * from './components/organisms/QuestCard';
39
- export * from './components/organisms/DataTable';
40
- export * from './components/organisms/CardList';
41
- export * from './components/organisms/DashboardLayout';
42
- export * from './components/organisms/CookieConsent';
43
- export * from './components/atoms/OTPInput';
44
- export * from './components/atoms/DirectionalIconHover';
45
- export * from './components/atoms/Skeleton';
46
- export * from './components/atoms/Switch';
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';