@gearbox-protocol/ui-kit 3.14.0-next.31 → 3.14.0-next.33
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/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/layout/main-aside-layout/main-aside-layout.cjs +1 -1
- package/dist/cjs/configs/tailwind-preset.cjs +1 -1
- package/dist/esm/components/graph/graph.js +462 -341
- package/dist/esm/components/layout/main-aside-layout/main-aside-layout.js +67 -41
- package/dist/esm/configs/tailwind-preset.js +1 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/graph/graph.d.ts +57 -2
- package/dist/types/components/graph/index.d.ts +1 -1
- package/dist/types/components/layout/main-aside-layout/main-aside-layout.d.ts +18 -0
- package/dist/types/configs/tailwind-preset.d.ts +1 -0
- package/package.json +1 -1
- package/src/styles/base.css +2 -0
- package/src/styles/theme.css +1 -0
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
import { jsx as m, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as m, jsxs as c, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import * as y from "react";
|
|
3
|
+
import { cn as i } from "../../../utils/cn.js";
|
|
4
|
+
const I = "56rem", M = "20rem", T = "1032px", C = y.forwardRef(
|
|
5
5
|
({
|
|
6
|
-
children:
|
|
6
|
+
children: p,
|
|
7
7
|
aside: s,
|
|
8
8
|
asidePosition: x = "right",
|
|
9
|
-
asideClassName:
|
|
10
|
-
mainClassName:
|
|
11
|
-
mainRef:
|
|
12
|
-
variant:
|
|
13
|
-
centeredMain:
|
|
14
|
-
|
|
9
|
+
asideClassName: f,
|
|
10
|
+
mainClassName: g,
|
|
11
|
+
mainRef: r,
|
|
12
|
+
variant: u = "default",
|
|
13
|
+
centeredMain: v = !1,
|
|
14
|
+
stickyAside: t = !0,
|
|
15
|
+
className: N,
|
|
15
16
|
...d
|
|
16
|
-
},
|
|
17
|
-
const e =
|
|
17
|
+
}, h) => {
|
|
18
|
+
const e = u === "detail", n = x === "left", l = e && v, a = s == null ? null : /* @__PURE__ */ m(
|
|
18
19
|
"aside",
|
|
19
20
|
{
|
|
20
|
-
className:
|
|
21
|
+
className: i(
|
|
21
22
|
"min-w-0 shrink-0",
|
|
22
23
|
e && !l && [
|
|
23
24
|
"w-full",
|
|
24
25
|
"z-30 lg:w-[420px] lg:min-w-[420px] lg:max-w-[420px]",
|
|
25
26
|
"xl:w-[460px] xl:min-w-[460px] xl:max-w-[460px]",
|
|
26
|
-
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
// ui-kit-owned sticky/scroll; skipped when the consumer manages
|
|
28
|
+
// stickiness itself (single page scroll, no nested scroll area).
|
|
29
|
+
t ? [
|
|
30
|
+
"max-h-full lg:max-h-[100vh] overflow-y-visible lg:overflow-y-auto",
|
|
31
|
+
// sticky below 2450px, fixed at ≥2450px
|
|
32
|
+
"lg:max-[2449px]:sticky lg:max-[2449px]:top-4",
|
|
33
|
+
"min-[2450px]:fixed min-[2450px]:top-28",
|
|
34
|
+
// fixed anchor matches asidePosition
|
|
35
|
+
n ? "min-[2450px]:left-32" : "min-[2450px]:right-32"
|
|
36
|
+
] : (
|
|
37
|
+
// Consumer-managed sticky (single page scroll). The aside
|
|
38
|
+
// stays in normal flow at all widths so its own controller
|
|
39
|
+
// can pin it. At ≥2450px the main column is centred on the
|
|
40
|
+
// viewport and the (still in-flow) aside is pulled into the
|
|
41
|
+
// gutter via a negative margin (= aside 460px + gap 24px),
|
|
42
|
+
// keeping the form beside the centred content without `fixed`.
|
|
43
|
+
n ? "min-[2450px]:-ml-[484px]" : "min-[2450px]:-mr-[484px]"
|
|
44
|
+
)
|
|
32
45
|
],
|
|
33
46
|
l && [
|
|
34
47
|
"w-full",
|
|
@@ -39,41 +52,47 @@ const _ = "56rem", I = "20rem", M = "1032px", T = E.forwardRef(
|
|
|
39
52
|
"lg:max-[1519px]:sticky lg:max-[1519px]:top-4",
|
|
40
53
|
// Gutter beside the viewport-centred shell (≥1520)
|
|
41
54
|
"min-[1520px]:absolute min-[1520px]:top-0",
|
|
42
|
-
|
|
55
|
+
n ? "min-[1520px]:right-full min-[1520px]:mr-6" : "min-[1520px]:left-full min-[1520px]:ml-6"
|
|
43
56
|
],
|
|
44
|
-
|
|
57
|
+
f
|
|
45
58
|
),
|
|
46
59
|
children: s
|
|
47
60
|
}
|
|
48
|
-
),
|
|
61
|
+
), E = i(
|
|
49
62
|
// lg…1519: children join the outer LP-style flex row
|
|
50
63
|
"lg:contents",
|
|
51
64
|
// ≥1520: viewport-centred shell; aside hangs in the gutter
|
|
52
65
|
"min-[1520px]:block min-[1520px]:relative min-[1520px]:mx-auto min-[1520px]:w-full",
|
|
53
|
-
`min-[1520px]:max-w-[max(${
|
|
54
|
-
),
|
|
66
|
+
`min-[1520px]:max-w-[max(${M},min(${I},calc(100vw-${T})))]`
|
|
67
|
+
), o = i(
|
|
55
68
|
"relative z-0 min-w-0 w-full",
|
|
56
69
|
!l && "flex-1",
|
|
57
|
-
e && !l && [
|
|
70
|
+
e && !l && (t ? [
|
|
58
71
|
"relative z-0 w-full",
|
|
72
|
+
// ≥2450px: centred main beside the `fixed` aside.
|
|
59
73
|
"min-[2450px]:mx-auto min-[2450px]:flex-none",
|
|
60
74
|
"min-[2450px]:max-w-[min(80rem,calc(100vw-460px-8rem))]",
|
|
61
|
-
|
|
62
|
-
]
|
|
75
|
+
n && "min-[2450px]:ml-[calc(460px+8rem)]"
|
|
76
|
+
] : [
|
|
77
|
+
"relative z-0 w-full",
|
|
78
|
+
// ≥2450px: fixed 80rem main, viewport-centred by the row's
|
|
79
|
+
// `justify-center`; the in-flow aside hangs into the gutter.
|
|
80
|
+
"min-[2450px]:flex-none min-[2450px]:w-[80rem] min-[2450px]:max-w-[80rem]"
|
|
81
|
+
]),
|
|
63
82
|
l && "flex-1 lg:max-w-none",
|
|
64
|
-
|
|
65
|
-
),
|
|
83
|
+
g
|
|
84
|
+
), _ = x === "left" ? /* @__PURE__ */ c(w, { children: [
|
|
66
85
|
a,
|
|
67
|
-
/* @__PURE__ */ m("div", { ref:
|
|
68
|
-
] }) : /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */ m("div", { ref:
|
|
86
|
+
/* @__PURE__ */ m("div", { ref: r, className: o, children: p })
|
|
87
|
+
] }) : /* @__PURE__ */ c(w, { children: [
|
|
88
|
+
/* @__PURE__ */ m("div", { ref: r, className: o, children: p }),
|
|
70
89
|
a
|
|
71
90
|
] });
|
|
72
91
|
return /* @__PURE__ */ m(
|
|
73
92
|
"div",
|
|
74
93
|
{
|
|
75
|
-
ref:
|
|
76
|
-
className:
|
|
94
|
+
ref: h,
|
|
95
|
+
className: i(
|
|
77
96
|
// base: mobile stack (column-reverse), desktop row
|
|
78
97
|
"flex w-full flex-col-reverse gap-6 lg:items-start",
|
|
79
98
|
!l && "lg:flex-row",
|
|
@@ -81,26 +100,33 @@ const _ = "56rem", I = "20rem", M = "1032px", T = E.forwardRef(
|
|
|
81
100
|
"relative mx-auto min-w-0",
|
|
82
101
|
"max-w-[calc(80rem+420px+1.5rem)]",
|
|
83
102
|
"xl:max-w-[calc(80rem+460px+1.5rem)]",
|
|
84
|
-
|
|
103
|
+
t ? (
|
|
104
|
+
// ui-kit owns sticky: ≥2450px switches to block + fixed aside.
|
|
105
|
+
"min-[2450px]:block min-[2450px]:max-w-none min-[2450px]:gap-0"
|
|
106
|
+
) : (
|
|
107
|
+
// Consumer owns sticky: stay a flex row and centre the main
|
|
108
|
+
// column on the viewport at ≥2450px (aside hangs in the gutter).
|
|
109
|
+
"min-[2450px]:max-w-none min-[2450px]:justify-center"
|
|
110
|
+
)
|
|
85
111
|
],
|
|
86
112
|
l && [
|
|
87
113
|
"relative mx-auto min-w-0 lg:flex-row",
|
|
88
114
|
"max-w-[calc(80rem+420px+1.5rem)] xl:max-w-[calc(80rem+460px+1.5rem)]",
|
|
89
115
|
"min-[1520px]:block min-[1520px]:max-w-none"
|
|
90
116
|
],
|
|
91
|
-
|
|
117
|
+
N
|
|
92
118
|
),
|
|
93
119
|
...d,
|
|
94
|
-
children: l ? /* @__PURE__ */ m("div", { className:
|
|
120
|
+
children: l ? /* @__PURE__ */ m("div", { className: E, children: _ }) : /* @__PURE__ */ c(w, { children: [
|
|
95
121
|
x === "left" && a,
|
|
96
|
-
/* @__PURE__ */ m("div", { ref:
|
|
122
|
+
/* @__PURE__ */ m("div", { ref: r, className: o, children: p }),
|
|
97
123
|
x === "right" && a
|
|
98
124
|
] })
|
|
99
125
|
}
|
|
100
126
|
);
|
|
101
127
|
}
|
|
102
128
|
);
|
|
103
|
-
|
|
129
|
+
C.displayName = "MainAsideLayout";
|
|
104
130
|
export {
|
|
105
|
-
|
|
131
|
+
C as MainAsideLayout
|
|
106
132
|
};
|
|
@@ -73,6 +73,7 @@ const e = {
|
|
|
73
73
|
"success-hover": "hsl(var(--success-hover))",
|
|
74
74
|
warning: "hsl(var(--warning))",
|
|
75
75
|
liquidation: "hsl(var(--liquidation))",
|
|
76
|
+
"liquidation-line": "hsl(var(--liquidation-line))",
|
|
76
77
|
border: "hsl(var(--border))",
|
|
77
78
|
input: "hsl(var(--input))",
|
|
78
79
|
ring: "hsl(var(--ring))",
|