@gearbox-protocol/ui-kit 3.14.0-next.24 → 3.14.0-next.25
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 e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("@gearbox-protocol/static"),q=require("class-variance-authority"),b=require("../base-link/base-link.cjs");require("react");require("@gearbox-protocol/sdk");const j=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../utils/z-index.cjs");const g=q.cva("[&_.icon-wrap]:-mt-px [&_.icon-wrap]:pl-1.5 [&_.icon-wrap]:leading-none [&_.icon-wrap]:text-secondary-foreground hover:[&_.icon-wrap]:text-foreground",{variants:{variant:{default:"[&_.content-wrap]:border-b [&_.content-wrap]:border-transparent hover:[&_.content-wrap]:border-foreground",underlined:"[&_.content-wrap]:border-0",unset:"[&_.content-wrap]:border-0"}},defaultVariants:{variant:"default"}});function i({className:c,children:n,href:l,target:p,variant:t="default",size:u="default",color:d="main",external:a=!1,asChild:w=!1,...f}){const s=a?e.jsx("span",{className:"icon-wrap -mt-px pl-1.5 leading-none",children:e.jsx(x.IconExternal,{size:14})}):null,o=a&&typeof n=="string"?(()=>{const r=n.trimEnd().lastIndexOf(" "),m=r===-1?"":n.slice(0,r+1),_=r===-1?n:n.slice(r+1);return e.jsxs("span",{className:"content-wrap",children:[m,e.jsxs("span",{className:"whitespace-nowrap",children:[_,s]})]})})():e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"content-wrap",children:n}),s]});return e.jsx(b.BaseLink,{href:l,target:p,external:a,variant:t,size:u,color:d,className:j.cn(g({variant:t}),c),...f,children:w?e.jsx("span",{children:o}):o})}i.displayName="Link";exports.Link=i;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IconExternal as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { BaseLink as
|
|
1
|
+
import { jsxs as o, jsx as r, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { IconExternal as x } from "@gearbox-protocol/static";
|
|
3
|
+
import { cva as b } from "class-variance-authority";
|
|
4
|
+
import { BaseLink as N } from "../base-link/base-link.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "@gearbox-protocol/sdk";
|
|
7
|
-
import { cn as
|
|
7
|
+
import { cn as h } from "../../utils/cn.js";
|
|
8
8
|
import "sonner";
|
|
9
9
|
import "@gearbox-protocol/sdk/common-utils";
|
|
10
10
|
import "luxon";
|
|
11
11
|
import "../../utils/z-index.js";
|
|
12
|
-
const
|
|
12
|
+
const v = b(
|
|
13
13
|
"[&_.icon-wrap]:-mt-px [&_.icon-wrap]:pl-1.5 [&_.icon-wrap]:leading-none [&_.icon-wrap]:text-secondary-foreground hover:[&_.icon-wrap]:text-foreground",
|
|
14
14
|
{
|
|
15
15
|
variants: {
|
|
@@ -22,40 +22,47 @@ const g = w(
|
|
|
22
22
|
defaultVariants: { variant: "default" }
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
|
-
function
|
|
26
|
-
className:
|
|
27
|
-
children:
|
|
28
|
-
href:
|
|
29
|
-
target:
|
|
30
|
-
variant:
|
|
31
|
-
size:
|
|
32
|
-
color:
|
|
33
|
-
external:
|
|
34
|
-
asChild:
|
|
35
|
-
...
|
|
25
|
+
function k({
|
|
26
|
+
className: i,
|
|
27
|
+
children: n,
|
|
28
|
+
href: c,
|
|
29
|
+
target: m,
|
|
30
|
+
variant: e = "default",
|
|
31
|
+
size: l = "default",
|
|
32
|
+
color: d = "main",
|
|
33
|
+
external: a = !1,
|
|
34
|
+
asChild: f = !1,
|
|
35
|
+
...w
|
|
36
36
|
}) {
|
|
37
|
+
const p = a ? /* @__PURE__ */ r("span", { className: "icon-wrap -mt-px pl-1.5 leading-none", children: /* @__PURE__ */ r(x, { size: 14 }) }) : null, s = a && typeof n == "string" ? (() => {
|
|
38
|
+
const t = n.trimEnd().lastIndexOf(" "), u = t === -1 ? "" : n.slice(0, t + 1), _ = t === -1 ? n : n.slice(t + 1);
|
|
39
|
+
return /* @__PURE__ */ o("span", { className: "content-wrap", children: [
|
|
40
|
+
u,
|
|
41
|
+
/* @__PURE__ */ o("span", { className: "whitespace-nowrap", children: [
|
|
42
|
+
_,
|
|
43
|
+
p
|
|
44
|
+
] })
|
|
45
|
+
] });
|
|
46
|
+
})() : /* @__PURE__ */ o(g, { children: [
|
|
47
|
+
/* @__PURE__ */ r("span", { className: "content-wrap", children: n }),
|
|
48
|
+
p
|
|
49
|
+
] });
|
|
37
50
|
return /* @__PURE__ */ r(
|
|
38
|
-
|
|
51
|
+
N,
|
|
39
52
|
{
|
|
40
|
-
href:
|
|
41
|
-
target:
|
|
42
|
-
external:
|
|
43
|
-
variant:
|
|
44
|
-
size:
|
|
45
|
-
color:
|
|
46
|
-
className:
|
|
47
|
-
...
|
|
48
|
-
children:
|
|
49
|
-
/* @__PURE__ */ r("span", { className: "content-wrap", children: a }),
|
|
50
|
-
n && /* @__PURE__ */ r("span", { className: "icon-wrap -mt-px pl-1.5 leading-none", children: /* @__PURE__ */ r(t, { size: 14 }) })
|
|
51
|
-
] }) : /* @__PURE__ */ e(f, { children: [
|
|
52
|
-
/* @__PURE__ */ r("span", { className: "content-wrap", children: a }),
|
|
53
|
-
n && /* @__PURE__ */ r("span", { className: "icon-wrap -mt-px pl-1.5 leading-none", children: /* @__PURE__ */ r(t, { size: 14 }) })
|
|
54
|
-
] })
|
|
53
|
+
href: c,
|
|
54
|
+
target: m,
|
|
55
|
+
external: a,
|
|
56
|
+
variant: e,
|
|
57
|
+
size: l,
|
|
58
|
+
color: d,
|
|
59
|
+
className: h(v({ variant: e }), i),
|
|
60
|
+
...w,
|
|
61
|
+
children: f ? /* @__PURE__ */ r("span", { children: s }) : s
|
|
55
62
|
}
|
|
56
63
|
);
|
|
57
64
|
}
|
|
58
|
-
|
|
65
|
+
k.displayName = "Link";
|
|
59
66
|
export {
|
|
60
|
-
|
|
67
|
+
k as Link
|
|
61
68
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/ui-kit",
|
|
3
|
-
"version": "3.14.0-next.
|
|
3
|
+
"version": "3.14.0-next.25",
|
|
4
4
|
"description": "Internal UI components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"@commitlint/cli": "^20.1.0",
|
|
167
167
|
"@commitlint/config-conventional": "^20.0.0",
|
|
168
168
|
"@gearbox-protocol/biome-config": "^1.0.2",
|
|
169
|
-
"@gearbox-protocol/sdk": "14.11.0-next.
|
|
169
|
+
"@gearbox-protocol/sdk": "14.11.0-next.9",
|
|
170
170
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
171
171
|
"@storybook/addon-a11y": "^10.0.8",
|
|
172
172
|
"@storybook/addon-docs": "^10.0.8",
|