@gearbox-protocol/ui-kit 4.0.0-next.13 → 4.0.0-next.15

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 (45) hide show
  1. package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
  2. package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
  3. package/dist/cjs/components/index.cjs +1 -1
  4. package/dist/cjs/components/layout/app-footer/app-footer.cjs +1 -1
  5. package/dist/cjs/components/sdk-status-pill/constants.cjs +1 -0
  6. package/dist/cjs/components/sdk-status-pill/index.cjs +1 -0
  7. package/dist/cjs/components/sdk-status-pill/sdk-status-pill.cjs +1 -0
  8. package/dist/cjs/components/sdk-status-pill/sdk-status.cjs +1 -0
  9. package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
  10. package/dist/cjs/index.cjs +1 -1
  11. package/dist/cjs/locale/en.json.cjs +1 -1
  12. package/dist/esm/components/checkbox/checkbox-labeled.js +1 -1
  13. package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -1
  14. package/dist/esm/components/index.js +591 -587
  15. package/dist/esm/components/layout/app-footer/app-footer.js +20 -23
  16. package/dist/esm/components/sdk-status-pill/constants.js +8 -0
  17. package/dist/esm/components/sdk-status-pill/index.js +8 -0
  18. package/dist/esm/components/sdk-status-pill/sdk-status-pill.js +59 -0
  19. package/dist/esm/components/sdk-status-pill/sdk-status.js +6 -0
  20. package/dist/esm/components/with-copy/with-copy.js +1 -1
  21. package/dist/esm/index.js +732 -728
  22. package/dist/esm/locale/en.json.js +3 -3
  23. package/dist/globals.css +1 -1
  24. package/dist/types/components/index.d.ts +1 -1
  25. package/dist/types/components/layout/app-footer/app-footer.d.ts +9 -15
  26. package/dist/types/components/sdk-status-pill/constants.d.ts +5 -0
  27. package/dist/types/components/sdk-status-pill/index.d.ts +3 -0
  28. package/dist/types/components/sdk-status-pill/sdk-status-pill.d.ts +27 -0
  29. package/dist/types/components/sdk-status-pill/sdk-status.d.ts +11 -0
  30. package/dist/types/index.d.ts +1 -2
  31. package/dist/types/locale/en.json.d.ts +3 -3
  32. package/dist/types/types/index.d.ts +0 -1
  33. package/package.json +1 -1
  34. package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +0 -1
  35. package/dist/cjs/components/block-sync-pill/block-sync-status.cjs +0 -1
  36. package/dist/cjs/components/block-sync-pill/index.cjs +0 -1
  37. package/dist/cjs/types/footer.cjs +0 -1
  38. package/dist/esm/components/block-sync-pill/block-sync-pill.js +0 -211
  39. package/dist/esm/components/block-sync-pill/block-sync-status.js +0 -12
  40. package/dist/esm/components/block-sync-pill/index.js +0 -4
  41. package/dist/esm/types/footer.js +0 -1
  42. package/dist/types/components/block-sync-pill/block-sync-pill.d.ts +0 -35
  43. package/dist/types/components/block-sync-pill/block-sync-status.d.ts +0 -29
  44. package/dist/types/components/block-sync-pill/index.d.ts +0 -1
  45. package/dist/types/types/footer.d.ts +0 -51
@@ -1,37 +1,34 @@
1
- import { jsx as e, jsxs as a, Fragment as f } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { BlockSyncPill as x } from "../../block-sync-pill/block-sync-pill.js";
4
- import { cn as h } from "../../../utils/cn.js";
5
- const u = [
1
+ import { jsx as e, jsxs as t, Fragment as p } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { cn as f } from "../../../utils/cn.js";
4
+ const d = [
6
5
  { label: "Docs", href: "https://docs.gearbox.finance" },
7
6
  { label: "Support", href: "https://discord.com/invite/gearbox" },
8
7
  { label: "Terms", href: "https://gearbox.finance/terms" },
9
8
  { label: "Privacy Policy", href: "https://gearbox.finance/privacy" }
10
- ], g = d.forwardRef(
9
+ ], x = i.forwardRef(
11
10
  ({
12
- links: o = u,
11
+ links: o = d,
13
12
  copyright: s,
14
13
  year: l = (/* @__PURE__ */ new Date()).getFullYear(),
15
- showStatus: c = !0,
16
- statusLabel: m = "Status",
17
- blockSyncProps: t,
18
- className: n,
19
- ...i
20
- }, p) => /* @__PURE__ */ e(
14
+ status: a,
15
+ className: c,
16
+ ...n
17
+ }, m) => /* @__PURE__ */ e(
21
18
  "footer",
22
19
  {
23
- ref: p,
24
- className: h(
20
+ ref: m,
21
+ className: f(
25
22
  "border-t border-border/60 px-4 sm:px-6 lg:px-8",
26
- n
23
+ c
27
24
  ),
28
- ...i,
29
- children: /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3 py-3 text-xs text-muted-foreground sm:justify-start sm:gap-x-6 sm:gap-y-2", children: [
30
- /* @__PURE__ */ e("span", { className: "order-1", children: s ?? /* @__PURE__ */ a(f, { children: [
25
+ ...n,
26
+ children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3 py-3 text-xs text-muted-foreground sm:justify-start sm:gap-x-6 sm:gap-y-2", children: [
27
+ /* @__PURE__ */ e("span", { className: "order-1", children: s ?? /* @__PURE__ */ t(p, { children: [
31
28
  "© Gearbox Protocol, ",
32
29
  l
33
30
  ] }) }),
34
- c && t ? /* @__PURE__ */ e("div", { className: "order-2 sm:order-3", children: /* @__PURE__ */ e(x, { ...t, statusLabel: m }) }) : null,
31
+ a ? /* @__PURE__ */ e("div", { className: "order-2 sm:order-3", children: a }) : null,
35
32
  /* @__PURE__ */ e("nav", { className: "order-3 flex w-full flex-wrap items-center justify-center gap-4 sm:order-2 sm:ml-auto sm:w-auto sm:justify-start", children: o.map((r) => /* @__PURE__ */ e(
36
33
  "a",
37
34
  {
@@ -47,8 +44,8 @@ const u = [
47
44
  }
48
45
  )
49
46
  );
50
- g.displayName = "AppFooter";
47
+ x.displayName = "AppFooter";
51
48
  export {
52
- g as AppFooter,
53
- u as DEFAULT_APP_FOOTER_LINKS
49
+ x as AppFooter,
50
+ d as DEFAULT_APP_FOOTER_LINKS
54
51
  };
@@ -0,0 +1,8 @@
1
+ class s {
2
+ static root = "sdk-status-pill-root";
3
+ static dot = "sdk-status-pill-dot";
4
+ static tooltip = "sdk-status-pill-tooltip";
5
+ }
6
+ export {
7
+ s as SdkStatusPillTest
8
+ };
@@ -0,0 +1,8 @@
1
+ import { SdkStatusPillTest as r } from "./constants.js";
2
+ import { sdkStatusDotVariant as s } from "./sdk-status.js";
3
+ import { SdkStatusPill as e } from "./sdk-status-pill.js";
4
+ export {
5
+ e as SdkStatusPill,
6
+ r as SdkStatusPillTest,
7
+ s as sdkStatusDotVariant
8
+ };
@@ -0,0 +1,59 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { StatusDot as a } from "../status-dot/status-dot.js";
3
+ import { SimpleTooltip as c } from "../tooltip/simple-tooltip.js";
4
+ import "../tooltip/tooltip.js";
5
+ import { useIntlTyped as m } from "../typed-intl/index.js";
6
+ import "react";
7
+ import "@gearbox-protocol/sdk/common-utils";
8
+ import { useMediaQuery as d } from "../../hooks/use-media-query.js";
9
+ import { SdkStatusPillTest as e } from "./constants.js";
10
+ import { sdkStatusDotVariant as l } from "./sdk-status.js";
11
+ const p = "(hover: none)", u = {
12
+ loading: "components.sdkStatus.connecting",
13
+ ready: "components.sdkStatus.connected",
14
+ error: "components.sdkStatus.disconnected"
15
+ };
16
+ function M({
17
+ status: o
18
+ }) {
19
+ const { formatMessage: s } = m(), i = !d(p), r = s({ messageId: u[o] }), n = (
20
+ // `<output>` rather than a span with role="status": same implicit live
21
+ // region, and the status is announced without the dot being focusable.
22
+ //
23
+ // The box is `size-6`, not the dot's 6px: a 6px hover/tap target is far
24
+ // under the 24px WCAG 2.5.8 minimum and genuinely hard to hit, while the
25
+ // dot itself has to stay small to keep the footer quiet.
26
+ //
27
+ // `-m-1.5` keeps that out of the layout in both axes, so the footer row
28
+ // keeps its height and the links do not shift.
29
+ /* @__PURE__ */ t(
30
+ "output",
31
+ {
32
+ className: "-m-1.5 flex size-6 cursor-pointer items-center justify-center",
33
+ "data-testid": e.root,
34
+ "aria-label": r,
35
+ children: /* @__PURE__ */ t(
36
+ a,
37
+ {
38
+ variant: l(o),
39
+ size: "xs",
40
+ pulse: o === "loading",
41
+ "data-testid": e.dot
42
+ }
43
+ )
44
+ }
45
+ )
46
+ );
47
+ return /* @__PURE__ */ t(
48
+ c,
49
+ {
50
+ title: n,
51
+ trigger: i ? "hover" : "click",
52
+ placement: "top",
53
+ children: /* @__PURE__ */ t("span", { className: "text-xs", "data-testid": e.tooltip, children: r })
54
+ }
55
+ );
56
+ }
57
+ export {
58
+ M as SdkStatusPill
59
+ };
@@ -0,0 +1,6 @@
1
+ function a(t) {
2
+ return t === "ready" ? "success" : "default";
3
+ }
4
+ export {
5
+ a as sdkStatusDotVariant
6
+ };
@@ -128,10 +128,10 @@ import "../legal-agreement/legal-agreement-theme.js";
128
128
  import "../loader/loader.js";
129
129
  import "../loading/loading.js";
130
130
  import "../loading-bar/loading-bar.js";
131
+ import "../status-dot/status-dot.js";
131
132
  import "../segmented-control/segmented-control.js";
132
133
  import "../separate-line/separate-line.js";
133
134
  import "../split-list/split-list.js";
134
- import "../status-dot/status-dot.js";
135
135
  import "../textarea/textarea.js";
136
136
  import "../theme-provider.js";
137
137
  function or({