@gearbox-protocol/ui-kit 3.13.1 → 3.14.0-next.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,35 +1,83 @@
1
- import { jsx as s, jsxs as f } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import { cn as a } from "../../../utils/cn.js";
4
- const d = c.forwardRef(
1
+ import { jsx as i, jsxs as c } from "react/jsx-runtime";
2
+ import * as g from "react";
3
+ import { cn as x } from "../../../utils/cn.js";
4
+ const u = g.forwardRef(
5
5
  ({
6
- children: i,
7
- aside: e,
8
- asidePosition: l = "right",
9
- asideClassName: t,
10
- className: m,
11
- ...o
12
- }, n) => {
13
- const r = e == null ? null : /* @__PURE__ */ s("aside", { className: a("min-w-0 shrink-0", t), children: e });
14
- return /* @__PURE__ */ f(
6
+ children: r,
7
+ aside: m,
8
+ asidePosition: e = "right",
9
+ asideClassName: n,
10
+ mainClassName: p,
11
+ mainRef: t,
12
+ variant: o = "default",
13
+ className: s,
14
+ ...w
15
+ }, f) => {
16
+ const l = o === "detail", a = m == null ? null : /* @__PURE__ */ i(
17
+ "aside",
18
+ {
19
+ className: x(
20
+ "min-w-0 shrink-0",
21
+ l && [
22
+ "w-full",
23
+ "z-30 lg:w-[420px] lg:min-w-[420px] lg:max-w-[420px]",
24
+ "xl:w-[460px] xl:min-w-[460px] xl:max-w-[460px]",
25
+ "max-h-full lg:max-h-[100vh] overflow-y-visible lg:overflow-y-auto",
26
+ // sticky below 2450px, fixed at ≥2450px
27
+ "lg:max-[2449px]:sticky lg:max-[2449px]:top-4",
28
+ "min-[2450px]:fixed min-[2450px]:top-28 min-[2450px]:right-32"
29
+ ],
30
+ n
31
+ ),
32
+ children: m
33
+ }
34
+ );
35
+ return /* @__PURE__ */ c(
15
36
  "div",
16
37
  {
17
- ref: n,
18
- className: a(
38
+ ref: f,
39
+ className: x(
40
+ // base: mobile stack (column-reverse), desktop row
19
41
  "flex w-full flex-col-reverse gap-6 lg:flex-row lg:items-start",
20
- m
42
+ l && [
43
+ "relative mx-auto min-w-0",
44
+ // cap width so aside doesn't overflow on medium-wide screens
45
+ "max-w-[calc(80rem+420px+1.5rem)]",
46
+ "xl:max-w-[calc(80rem+460px+1.5rem)]",
47
+ // at ≥2450px aside is fixed → switch wrapper to block so main can
48
+ // centre independently
49
+ "min-[2450px]:block min-[2450px]:max-w-none min-[2450px]:gap-0"
50
+ ],
51
+ s
21
52
  ),
22
- ...o,
53
+ ...w,
23
54
  children: [
24
- l === "left" && r,
25
- /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: i }),
26
- l === "right" && r
55
+ e === "left" && a,
56
+ /* @__PURE__ */ i(
57
+ "div",
58
+ {
59
+ ref: t,
60
+ className: x(
61
+ "min-w-0 flex-1",
62
+ l && [
63
+ "relative z-0 w-full",
64
+ // at ≥2450px: stop growing and centre with explicit max-width
65
+ // (leaves room for the fixed 460px aside + 8rem right offset)
66
+ "min-[2450px]:mx-auto min-[2450px]:flex-none",
67
+ "min-[2450px]:max-w-[min(80rem,calc(100vw-460px-8rem))]"
68
+ ],
69
+ p
70
+ ),
71
+ children: r
72
+ }
73
+ ),
74
+ e === "right" && a
27
75
  ]
28
76
  }
29
77
  );
30
78
  }
31
79
  );
32
- d.displayName = "MainAsideLayout";
80
+ u.displayName = "MainAsideLayout";
33
81
  export {
34
- d as MainAsideLayout
82
+ u as MainAsideLayout
35
83
  };