@gearbox-protocol/ui-kit 3.14.0-next.67 → 3.14.0-next.68
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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("class-variance-authority"),d=require("react");require("@gearbox-protocol/sdk");const y=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../utils/z-index.cjs");function m(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const i=m(d),q=p.cva(["relative flex items-center","px-[18px] first:pl-0 last:pr-0","before:absolute before:left-0 before:top-[20%] before:h-[60%] before:border-l before:border-gray-40 before:content-[''] first:before:border-l-transparent"].join(" "),{variants:{colSize:{equal:"grow shrink-0 basis-0",auto:"w-auto grow-0 shrink-0 basis-auto"}},defaultVariants:{colSize:"equal"}}),l=i.forwardRef(({children:e,colSize:r=!0,className:t},o)=>{const c=i.Children.toArray(e).filter(Boolean);return s.jsx("div",{ref:o,className:y.cn("flex w-full flex-row flex-nowrap","items-stretch",t),children:c.map((a,n,u)=>{const f=typeof r=="function"?r(n,u):r,b=i.isValidElement(a)&&a.key!=null?a.key:`split-item-${n}`;return s.jsx("div",{className:q({colSize:f==="auto"?"auto":"equal"}),children:a},b)})})});l.displayName="SplitList";exports.SplitList=l;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { cva as
|
|
2
|
+
import { cva as c } from "class-variance-authority";
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import "@gearbox-protocol/sdk";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as u } from "../../utils/cn.js";
|
|
6
6
|
import "sonner";
|
|
7
7
|
import "@gearbox-protocol/sdk/common-utils";
|
|
8
8
|
import "luxon";
|
|
9
9
|
import "../../utils/z-index.js";
|
|
10
|
-
const
|
|
10
|
+
const b = c(
|
|
11
11
|
[
|
|
12
12
|
/* layout */
|
|
13
13
|
"relative flex items-center",
|
|
@@ -25,36 +25,36 @@ const u = m(
|
|
|
25
25
|
},
|
|
26
26
|
defaultVariants: { colSize: "equal" }
|
|
27
27
|
}
|
|
28
|
-
),
|
|
28
|
+
), d = t.forwardRef(
|
|
29
29
|
({ children: i, colSize: e = !0, className: l }, s) => {
|
|
30
30
|
const n = t.Children.toArray(i).filter(Boolean);
|
|
31
31
|
return /* @__PURE__ */ a(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
34
|
ref: s,
|
|
35
|
-
className:
|
|
35
|
+
className: u(
|
|
36
36
|
"flex w-full flex-row flex-nowrap",
|
|
37
37
|
"items-stretch",
|
|
38
38
|
l
|
|
39
39
|
),
|
|
40
|
-
children: n.map((r, o) => {
|
|
41
|
-
const
|
|
40
|
+
children: n.map((r, o, f) => {
|
|
41
|
+
const p = typeof e == "function" ? e(o, f) : e, m = t.isValidElement(r) && r.key != null ? r.key : `split-item-${o}`;
|
|
42
42
|
return /* @__PURE__ */ a(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
|
-
className:
|
|
46
|
-
colSize:
|
|
45
|
+
className: b({
|
|
46
|
+
colSize: p === "auto" ? "auto" : "equal"
|
|
47
47
|
}),
|
|
48
48
|
children: r
|
|
49
49
|
},
|
|
50
|
-
|
|
50
|
+
m
|
|
51
51
|
);
|
|
52
52
|
})
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
|
-
|
|
57
|
+
d.displayName = "SplitList";
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
d as SplitList
|
|
60
60
|
};
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
type ColSize = boolean | "auto";
|
|
4
4
|
export interface SplitListProps {
|
|
5
5
|
/** Size for each column (or function for per-index). @default true */
|
|
6
|
-
colSize?: ColSize | ((index: number) => ColSize);
|
|
6
|
+
colSize?: ColSize | ((index: number, arr: unknown[]) => ColSize);
|
|
7
7
|
/** List items. */
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
/** Extra class name for the root. */
|