@gearbox-protocol/ui-kit 4.0.0-next.30 → 4.0.0-next.31
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/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/radio-group/index.cjs +1 -0
- package/dist/cjs/components/radio-group/radio-group.cjs +1 -0
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -0
- package/dist/esm/components/index.js +249 -246
- package/dist/esm/components/radio-group/index.js +5 -0
- package/dist/esm/components/radio-group/radio-group.js +57 -0
- package/dist/esm/components/with-copy/with-copy.js +3 -2
- package/dist/esm/index.js +488 -485
- package/dist/globals.css +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/radio-group/index.d.ts +1 -0
- package/dist/types/components/radio-group/radio-group.d.ts +39 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "@radix-ui/react-radio-group";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
import * as s from "react";
|
|
5
|
+
import "@gearbox-protocol/sdk/onchain";
|
|
6
|
+
import { cn as t } from "../../utils/cn.js";
|
|
7
|
+
import "sonner";
|
|
8
|
+
import "@gearbox-protocol/sdk/common-utils";
|
|
9
|
+
import "luxon";
|
|
10
|
+
import "../../utils/z-index.js";
|
|
11
|
+
const l = n("", {
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
md: "h-4 w-4",
|
|
15
|
+
lg: "h-5 w-5"
|
|
16
|
+
},
|
|
17
|
+
color: {
|
|
18
|
+
primary: "border-primary",
|
|
19
|
+
secondary: "border-gray-50 data-[state=checked]:border-primary"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
size: "md",
|
|
24
|
+
color: "primary"
|
|
25
|
+
}
|
|
26
|
+
}), p = s.forwardRef(({ className: e, ...o }, i) => /* @__PURE__ */ a(r.Root, { ref: i, className: t(e), ...o }));
|
|
27
|
+
p.displayName = r.Root.displayName;
|
|
28
|
+
const c = s.forwardRef(({ className: e, color: o, size: i, ...d }, m) => /* @__PURE__ */ a(
|
|
29
|
+
r.Item,
|
|
30
|
+
{
|
|
31
|
+
ref: m,
|
|
32
|
+
className: t(
|
|
33
|
+
"group relative shrink-0 rounded-full border shadow cursor-pointer transition-colors flex items-center justify-center",
|
|
34
|
+
"data-[state=checked]:border-primary",
|
|
35
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
36
|
+
l({ size: i, color: o }),
|
|
37
|
+
"disabled:cursor-not-allowed disabled:bg-gray-20 disabled:border-gray-50",
|
|
38
|
+
e
|
|
39
|
+
),
|
|
40
|
+
...d,
|
|
41
|
+
children: /* @__PURE__ */ a(
|
|
42
|
+
r.Indicator,
|
|
43
|
+
{
|
|
44
|
+
className: t(
|
|
45
|
+
"pointer-events-none flex items-center justify-center",
|
|
46
|
+
"size-2 rounded-full bg-primary",
|
|
47
|
+
"group-disabled:bg-gray-50"
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
));
|
|
53
|
+
c.displayName = r.Item.displayName;
|
|
54
|
+
export {
|
|
55
|
+
p as RadioGroup,
|
|
56
|
+
c as RadioGroupItem
|
|
57
|
+
};
|
|
@@ -128,13 +128,14 @@ 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 "../radio-group/radio-group.js";
|
|
131
132
|
import "../status-dot/status-dot.js";
|
|
132
133
|
import "../segmented-control/segmented-control.js";
|
|
133
134
|
import "../separate-line/separate-line.js";
|
|
134
135
|
import "../split-list/split-list.js";
|
|
135
136
|
import "../textarea/textarea.js";
|
|
136
137
|
import "../theme-provider.js";
|
|
137
|
-
function
|
|
138
|
+
function rr({
|
|
138
139
|
toCopy: u,
|
|
139
140
|
children: d,
|
|
140
141
|
onCopySuccess: f,
|
|
@@ -216,5 +217,5 @@ function or({
|
|
|
216
217
|
return a ? /* @__PURE__ */ t(T, { placement: "top", triangle: !0, title: c(), children: a }) : c();
|
|
217
218
|
}
|
|
218
219
|
export {
|
|
219
|
-
|
|
220
|
+
rr as WithCopy
|
|
220
221
|
};
|