@cryptlex/web-components 1.2.0 → 1.2.2
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/components/ui/button.es.js +16 -16
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/navigation-menu.es.js +51 -52
- package/dist/components/ui/navigation-menu.es.js.map +1 -1
- package/dist/components/ui/sonner.es.js +21 -0
- package/dist/components/ui/sonner.es.js.map +1 -0
- package/dist/index.es.d.ts +5 -0
- package/dist/index.es.js +17 -15
- package/dist/index.es.js.map +1 -1
- package/lib/index.css +10 -0
- package/lib/tokens.css +8 -8
- package/package.json +3 -2
- package/tailwind.preset.ts +14 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import * as g from "react";
|
|
3
|
-
import { Slot as
|
|
3
|
+
import { Slot as v } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva as p } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Loader as
|
|
7
|
-
const
|
|
8
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
5
|
+
import { cn as b } from "../../utils/index.es.js";
|
|
6
|
+
import { Loader as x } from "./loader.es.js";
|
|
7
|
+
const h = p(
|
|
8
|
+
"inline-flex items-center justify-center no-underline whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
13
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
14
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
15
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80 hover:text-primary-foreground",
|
|
13
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:text-destructive-foreground",
|
|
14
|
+
outline: "border border-input text-accent bg-background hover:bg-accent hover:text-accent-foreground",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground hover:text-secondary-foreground hover:bg-secondary/80",
|
|
16
16
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
17
17
|
link: "text-primary underline-offset-4 hover:underline"
|
|
18
18
|
},
|
|
@@ -35,21 +35,21 @@ const x = p(
|
|
|
35
35
|
size: a,
|
|
36
36
|
loading: t,
|
|
37
37
|
disabled: d,
|
|
38
|
-
asChild:
|
|
38
|
+
asChild: u = !1,
|
|
39
39
|
icon: o,
|
|
40
40
|
children: e,
|
|
41
|
-
...
|
|
41
|
+
...c
|
|
42
42
|
}, f) => {
|
|
43
|
-
const l =
|
|
43
|
+
const l = u ? v : "button", n = o;
|
|
44
44
|
return /* @__PURE__ */ m(
|
|
45
45
|
l,
|
|
46
46
|
{
|
|
47
|
-
className:
|
|
47
|
+
className: b(h({ variant: s, size: a, className: i })),
|
|
48
48
|
ref: f,
|
|
49
49
|
disabled: t || d,
|
|
50
|
-
...
|
|
50
|
+
...c,
|
|
51
51
|
children: [
|
|
52
|
-
t ? /* @__PURE__ */ r(
|
|
52
|
+
t ? /* @__PURE__ */ r(x, {}) : n ? /* @__PURE__ */ r(n, { className: "h-4 w-4" }) : null,
|
|
53
53
|
e ? /* @__PURE__ */ r("div", { className: o && e ? "ml-2" : "", children: e }) : null
|
|
54
54
|
]
|
|
55
55
|
}
|
|
@@ -59,6 +59,6 @@ const x = p(
|
|
|
59
59
|
y.displayName = "Button";
|
|
60
60
|
export {
|
|
61
61
|
y as Button,
|
|
62
|
-
|
|
62
|
+
h as buttonVariants
|
|
63
63
|
};
|
|
64
64
|
//# sourceMappingURL=button.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.es.js","sources":["../../../lib/components/ui/button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils\"\nimport { Loader } from \"./loader\";\nimport { LucideIcon } from \"lucide-react\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n loading?: boolean;\n icon?: LucideIcon;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n loading,\n disabled,\n asChild = false,\n icon,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\";\n const Icon = icon;\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || disabled}\n {...props}\n >\n {/* Shows loading when `loading:true` irrespective of icon present or not; otherwise shows button icon if present */}\n {loading ? <Loader /> : Icon ? <Icon className=\"h-4 w-4\" /> : null}\n {/* Margin left only when both icon and children (button text) are present */}\n {children ? (\n <div className={icon && children ? \"ml-2\" : \"\"}>{children}</div>\n ) : null}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\"; // Set display name for better debugging\n\nexport { Button, buttonVariants };\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","loading","disabled","asChild","icon","children","props","ref","Comp","Slot","Icon","jsxs","cn","jsx","Loader"],"mappings":";;;;;;AAQA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAUMC,IAASC,EAAM;AAAA,EACnB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,KAELC,MACG;AACG,UAAAC,IAAOL,IAAUM,IAAO,UACxBC,IAAON;AAGX,WAAA,gBAAAO;AAAA,MAACH;AAAA,MAAA;AAAA,QACC,WAAWI,EAAGlB,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAS;AAAA,QACA,UAAUN,KAAWC;AAAA,QACpB,GAAGI;AAAA,QAGH,UAAA;AAAA,UAAUL,IAAA,gBAAAY,EAACC,KAAO,IAAKJ,sBAAQA,GAAK,EAAA,WAAU,WAAU,IAAK;AAAA,UAE7DL,sBACE,OAAI,EAAA,WAAWD,KAAQC,IAAW,SAAS,IAAK,UAAAA,EAAA,CAAS,IACxD;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAGN;AAEAT,EAAO,cAAc;"}
|
|
1
|
+
{"version":3,"file":"button.es.js","sources":["../../../lib/components/ui/button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils\"\nimport { Loader } from \"./loader\";\nimport { LucideIcon } from \"lucide-react\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center no-underline whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80 hover:text-primary-foreground\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:text-destructive-foreground\",\n outline:\n \"border border-input text-accent bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n loading?: boolean;\n icon?: LucideIcon;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n loading,\n disabled,\n asChild = false,\n icon,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\";\n const Icon = icon;\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || disabled}\n {...props}\n >\n {/* Shows loading when `loading:true` irrespective of icon present or not; otherwise shows button icon if present */}\n {loading ? <Loader /> : Icon ? <Icon className=\"h-4 w-4\" /> : null}\n {/* Margin left only when both icon and children (button text) are present */}\n {children ? (\n <div className={icon && children ? \"ml-2\" : \"\"}>{children}</div>\n ) : null}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\"; // Set display name for better debugging\n\nexport { Button, buttonVariants };\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","loading","disabled","asChild","icon","children","props","ref","Comp","Slot","Icon","jsxs","cn","jsx","Loader"],"mappings":";;;;;;AAQA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAUMC,IAASC,EAAM;AAAA,EACnB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,KAELC,MACG;AACG,UAAAC,IAAOL,IAAUM,IAAO,UACxBC,IAAON;AAGX,WAAA,gBAAAO;AAAA,MAACH;AAAA,MAAA;AAAA,QACC,WAAWI,EAAGlB,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAS;AAAA,QACA,UAAUN,KAAWC;AAAA,QACpB,GAAGI;AAAA,QAGH,UAAA;AAAA,UAAUL,IAAA,gBAAAY,EAACC,KAAO,IAAKJ,sBAAQA,GAAK,EAAA,WAAU,WAAU,IAAK;AAAA,UAE7DL,sBACE,OAAI,EAAA,WAAWD,KAAQC,IAAW,SAAS,IAAK,UAAAA,EAAA,CAAS,IACxD;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAGN;AAEAT,EAAO,cAAc;"}
|
|
@@ -1,49 +1,48 @@
|
|
|
1
|
-
import { jsxs as s, jsx as
|
|
1
|
+
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as t from "@radix-ui/react-navigation-menu";
|
|
4
4
|
import { cva as c } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as n } from "../../utils/index.es.js";
|
|
6
6
|
import { ChevronDownIcon as f } from "@radix-ui/react-icons";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { buttonVariants as u } from "./button.es.js";
|
|
8
|
+
const p = r.forwardRef(({ className: e, children: a, ...o }, d) => /* @__PURE__ */ s(
|
|
9
|
+
t.Root,
|
|
9
10
|
{
|
|
10
11
|
ref: d,
|
|
11
|
-
className:
|
|
12
|
+
className: n(
|
|
12
13
|
"relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
13
|
-
|
|
14
|
+
e
|
|
14
15
|
),
|
|
15
16
|
...o,
|
|
16
17
|
children: [
|
|
17
18
|
a,
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ i(m, {})
|
|
19
20
|
]
|
|
20
21
|
}
|
|
21
22
|
));
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
p.displayName = t.Root.displayName;
|
|
24
|
+
const g = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ i(
|
|
25
|
+
t.List,
|
|
25
26
|
{
|
|
26
27
|
ref: o,
|
|
27
|
-
className:
|
|
28
|
+
className: n(
|
|
28
29
|
"group flex flex-1 list-none items-center justify-center space-x-1 flex-wrap",
|
|
29
|
-
|
|
30
|
+
e
|
|
30
31
|
),
|
|
31
32
|
...a
|
|
32
33
|
}
|
|
33
34
|
));
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
), v = r.forwardRef(({ className: t, children: a, ...o }, d) => /* @__PURE__ */ s(
|
|
38
|
-
e.Trigger,
|
|
35
|
+
g.displayName = t.List.displayName;
|
|
36
|
+
const j = t.Item, v = c(u({ size: "sm", variant: "outline" })), N = r.forwardRef(({ className: e, children: a, ...o }, d) => /* @__PURE__ */ s(
|
|
37
|
+
t.Trigger,
|
|
39
38
|
{
|
|
40
39
|
ref: d,
|
|
41
|
-
className:
|
|
40
|
+
className: n(v(), "group", e),
|
|
42
41
|
...o,
|
|
43
42
|
children: [
|
|
44
43
|
a,
|
|
45
44
|
" ",
|
|
46
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ i(
|
|
47
46
|
f,
|
|
48
47
|
{
|
|
49
48
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
@@ -53,70 +52,70 @@ const I = e.Item, g = c(
|
|
|
53
52
|
]
|
|
54
53
|
}
|
|
55
54
|
));
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
55
|
+
N.displayName = t.Trigger.displayName;
|
|
56
|
+
const h = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ i(
|
|
57
|
+
t.Content,
|
|
59
58
|
{
|
|
60
59
|
ref: o,
|
|
61
|
-
className:
|
|
60
|
+
className: n(
|
|
62
61
|
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
|
|
63
|
-
|
|
62
|
+
e
|
|
64
63
|
),
|
|
65
64
|
...a
|
|
66
65
|
}
|
|
67
66
|
));
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
67
|
+
h.displayName = t.Content.displayName;
|
|
68
|
+
const w = t.Link, m = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ i("div", { className: n("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ i(
|
|
69
|
+
t.Viewport,
|
|
71
70
|
{
|
|
72
|
-
className:
|
|
71
|
+
className: n(
|
|
73
72
|
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
74
|
-
|
|
73
|
+
e
|
|
75
74
|
),
|
|
76
75
|
ref: o,
|
|
77
76
|
...a
|
|
78
77
|
}
|
|
79
78
|
) }));
|
|
80
|
-
m.displayName =
|
|
81
|
-
const x = r.forwardRef(({ className:
|
|
82
|
-
|
|
79
|
+
m.displayName = t.Viewport.displayName;
|
|
80
|
+
const x = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ i(
|
|
81
|
+
t.Indicator,
|
|
83
82
|
{
|
|
84
83
|
ref: o,
|
|
85
|
-
className:
|
|
84
|
+
className: n(
|
|
86
85
|
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
87
|
-
|
|
86
|
+
e
|
|
88
87
|
),
|
|
89
88
|
...a,
|
|
90
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ i("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
91
90
|
}
|
|
92
91
|
));
|
|
93
|
-
x.displayName =
|
|
94
|
-
const
|
|
92
|
+
x.displayName = t.Indicator.displayName;
|
|
93
|
+
const y = r.forwardRef(({ className: e, title: a, children: o, ...d }, l) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(w, { asChild: !0, children: /* @__PURE__ */ s(
|
|
95
94
|
"a",
|
|
96
95
|
{
|
|
97
96
|
ref: l,
|
|
98
|
-
className:
|
|
99
|
-
"block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
100
|
-
|
|
97
|
+
className: n(
|
|
98
|
+
"block select-none text-accent space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
99
|
+
e
|
|
101
100
|
),
|
|
102
101
|
...d,
|
|
103
102
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ i("div", { className: "text-sm font-medium leading-none", children: a }),
|
|
104
|
+
/* @__PURE__ */ i("p", { className: "line-clamp-2 text-sm leading-snug text-muted-foreground", children: o })
|
|
106
105
|
]
|
|
107
106
|
}
|
|
108
107
|
) }) }));
|
|
109
|
-
|
|
108
|
+
y.displayName = "NavigationItemListItem";
|
|
110
109
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
p as NavigationMenu,
|
|
111
|
+
h as NavigationMenuContent,
|
|
113
112
|
x as NavigationMenuIndicator,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
j as NavigationMenuItem,
|
|
114
|
+
w as NavigationMenuLink,
|
|
115
|
+
g as NavigationMenuList,
|
|
116
|
+
y as NavigationMenuListItem,
|
|
117
|
+
N as NavigationMenuTrigger,
|
|
119
118
|
m as NavigationMenuViewport,
|
|
120
|
-
|
|
119
|
+
v as navigationMenuTriggerStyle
|
|
121
120
|
};
|
|
122
121
|
//# sourceMappingURL=navigation-menu.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-menu.es.js","sources":["../../../lib/components/ui/navigation-menu.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1 flex-wrap\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(
|
|
1
|
+
{"version":3,"file":"navigation-menu.es.js","sources":["../../../lib/components/ui/navigation-menu.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\nimport { buttonVariants } from \"./button\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1 flex-wrap\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(buttonVariants({size:'sm', variant: 'outline'}))\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nconst NavigationMenuListItem = React.forwardRef<\n React.ElementRef<\"a\">,\n React.ComponentPropsWithoutRef<\"a\">\n>(({ className, title, children, ...props }, ref) => {\n return (\n <li>\n <NavigationMenuLink asChild>\n <a\n ref={ref}\n className={cn(\n \"block select-none text-accent space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground\",\n className\n )}\n {...props}\n >\n <div className=\"text-sm font-medium leading-none\">{title}</div>\n <p className=\"line-clamp-2 text-sm leading-snug text-muted-foreground\">\n {children}\n </p>\n </a>\n </NavigationMenuLink>\n </li>\n )\n})\nNavigationMenuListItem.displayName = \"NavigationItemListItem\"\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n NavigationMenuListItem\n}\n"],"names":["NavigationMenu","React","className","children","props","ref","jsxs","NavigationMenuPrimitive","cn","NavigationMenuViewport","NavigationMenuList","jsx","NavigationMenuItem","navigationMenuTriggerStyle","cva","buttonVariants","NavigationMenuTrigger","ChevronDownIcon","NavigationMenuContent","NavigationMenuLink","NavigationMenuIndicator","NavigationMenuListItem","title"],"mappings":"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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Toaster as r } from "sonner";
|
|
3
|
+
const s = ({ ...t }) => /* @__PURE__ */ o(
|
|
4
|
+
r,
|
|
5
|
+
{
|
|
6
|
+
className: "toaster group",
|
|
7
|
+
toastOptions: {
|
|
8
|
+
classNames: {
|
|
9
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
10
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
11
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
12
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
...t
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
export {
|
|
19
|
+
s as Toaster
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=sonner.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sonner.es.js","sources":["../../../lib/components/ui/sonner.tsx"],"sourcesContent":["import { Toaster as Sonner } from \"sonner\"\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n\n\n return (\n <Sonner\n className=\"toaster group\"\n toastOptions={{\n classNames: {\n toast:\n \"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg\",\n description: \"group-[.toast]:text-muted-foreground\",\n actionButton:\n \"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground\",\n cancelButton:\n \"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground\",\n },\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster }\n"],"names":["Toaster","props","jsx","Sonner"],"mappings":";;AAIA,MAAMA,IAAU,CAAC,EAAE,GAAGC,QAIlB,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,cAAc;AAAA,MACZ,YAAY;AAAA,QACV,OACE;AAAA,QACF,aAAa;AAAA,QACb,cACE;AAAA,QACF,cACE;AAAA,MAAA;AAAA,IAEN;AAAA,IACC,GAAGF;AAAA,EAAA;AACN;"}
|
package/dist/index.es.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
34
34
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
35
35
|
import { SeparatorProps } from '@radix-ui/react-separator';
|
|
36
36
|
import { SlotProps } from '@radix-ui/react-slot';
|
|
37
|
+
import { Toaster as Toaster_2 } from 'sonner';
|
|
37
38
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
38
39
|
import { UniqueOption } from 'recharts/types/util/payload/getUniqPayload';
|
|
39
40
|
import { ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
@@ -597,6 +598,10 @@ declare const THEMES: {
|
|
|
597
598
|
readonly dark: ".dark";
|
|
598
599
|
};
|
|
599
600
|
|
|
601
|
+
export declare const Toaster: ({ ...props }: ToasterProps) => JSX_2.Element;
|
|
602
|
+
|
|
603
|
+
declare type ToasterProps = React.ComponentProps<typeof Toaster_2>;
|
|
604
|
+
|
|
600
605
|
export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
|
|
601
606
|
|
|
602
607
|
export declare const TooltipContent: React_2.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
package/dist/index.es.js
CHANGED
|
@@ -2,13 +2,13 @@ import { Badge as r, badgeVariants as t } from "./components/ui/badge.es.js";
|
|
|
2
2
|
import { Breadcrumb as n, BreadcrumbEllipsis as i, BreadcrumbItem as d, BreadcrumbLink as p, BreadcrumbList as l, BreadcrumbPage as m, BreadcrumbSeparator as u } from "./components/ui/breadcrumb.es.js";
|
|
3
3
|
import { Button as g, buttonVariants as b } from "./components/ui/button.es.js";
|
|
4
4
|
import { Calendar as c } from "./components/ui/calendar.es.js";
|
|
5
|
-
import { Card as x, CardContent as
|
|
5
|
+
import { Card as x, CardContent as f, CardDescription as D, CardFooter as s, CardHeader as T, CardTitle as h } from "./components/ui/card.es.js";
|
|
6
6
|
import { ChartContainer as v, ChartLegend as w, ChartLegendContent as P, ChartStyle as B, ChartTooltip as F, ChartTooltipContent as L } from "./components/ui/chart.es.js";
|
|
7
7
|
import { Checkbox as N } from "./components/ui/checkbox.es.js";
|
|
8
8
|
import { Collapsible as A, CollapsibleContent as y, CollapsibleTrigger as H } from "./components/ui/collapsible.es.js";
|
|
9
9
|
import { Command as V, CommandDialog as E, CommandEmpty as O, CommandGroup as U, CommandInput as j, CommandItem as q, CommandList as z, CommandSeparator as J, CommandShortcut as K } from "./components/ui/command.es.js";
|
|
10
10
|
import { Dialog as W, DialogClose as X, DialogContent as Y, DialogDescription as Z, DialogFooter as _, DialogHeader as $, DialogOverlay as ee, DialogPortal as oe, DialogTitle as re, DialogTrigger as te } from "./components/ui/dialog.es.js";
|
|
11
|
-
import { DropdownMenu as ne, DropdownMenuCheckboxItem as ie, DropdownMenuContent as de, DropdownMenuGroup as pe, DropdownMenuItem as le, DropdownMenuLabel as me, DropdownMenuPortal as ue, DropdownMenuRadioGroup as Se, DropdownMenuRadioItem as ge, DropdownMenuSeparator as be, DropdownMenuShortcut as Ce, DropdownMenuSub as ce, DropdownMenuSubContent as Me, DropdownMenuSubTrigger as xe, DropdownMenuTrigger as
|
|
11
|
+
import { DropdownMenu as ne, DropdownMenuCheckboxItem as ie, DropdownMenuContent as de, DropdownMenuGroup as pe, DropdownMenuItem as le, DropdownMenuLabel as me, DropdownMenuPortal as ue, DropdownMenuRadioGroup as Se, DropdownMenuRadioItem as ge, DropdownMenuSeparator as be, DropdownMenuShortcut as Ce, DropdownMenuSub as ce, DropdownMenuSubContent as Me, DropdownMenuSubTrigger as xe, DropdownMenuTrigger as fe } from "./components/ui/dropdown-menu.es.js";
|
|
12
12
|
import { Form as se, FormControl as Te, FormDescription as he, FormField as Ie, FormItem as ve, FormLabel as we, FormMessage as Pe, useFormField as Be } from "./components/ui/form.es.js";
|
|
13
13
|
import { Input as Le } from "./components/ui/input.es.js";
|
|
14
14
|
import { Label as Ne } from "./components/ui/label.es.js";
|
|
@@ -19,15 +19,16 @@ import { Popover as Ke, PopoverAnchor as Qe, PopoverContent as We, PopoverTrigge
|
|
|
19
19
|
import { RadioGroup as Ze, RadioGroupItem as _e } from "./components/ui/radio-group.es.js";
|
|
20
20
|
import { Select as eo, SelectContent as oo, SelectGroup as ro, SelectItem as to, SelectLabel as ao, SelectScrollDownButton as no, SelectScrollUpButton as io, SelectSeparator as po, SelectTrigger as lo, SelectValue as mo } from "./components/ui/select.es.js";
|
|
21
21
|
import { Separator as So } from "./components/ui/separator.es.js";
|
|
22
|
-
import { Sheet as bo, SheetClose as Co, SheetContent as co, SheetDescription as Mo, SheetFooter as xo, SheetHeader as
|
|
22
|
+
import { Sheet as bo, SheetClose as Co, SheetContent as co, SheetDescription as Mo, SheetFooter as xo, SheetHeader as fo, SheetOverlay as Do, SheetPortal as so, SheetTitle as To, SheetTrigger as ho } from "./components/ui/sheet.es.js";
|
|
23
23
|
import { Sidebar as vo, SidebarContent as wo, SidebarFooter as Po, SidebarGroup as Bo, SidebarGroupAction as Fo, SidebarGroupContent as Lo, SidebarGroupLabel as Go, SidebarHeader as No, SidebarInput as ko, SidebarInset as Ao, SidebarMenu as yo, SidebarMenuAction as Ho, SidebarMenuBadge as Ro, SidebarMenuButton as Vo, SidebarMenuItem as Eo, SidebarMenuSkeleton as Oo, SidebarMenuSub as Uo, SidebarMenuSubButton as jo, SidebarMenuSubItem as qo, SidebarProvider as zo, SidebarRail as Jo, SidebarSeparator as Ko, SidebarTrigger as Qo, useSidebar as Wo } from "./components/ui/sidebar.es.js";
|
|
24
24
|
import { Skeleton as Yo } from "./components/ui/skeleton.es.js";
|
|
25
25
|
import { Table as _o, TableBody as $o, TableCaption as er, TableCell as or, TableFooter as rr, TableHead as tr, TableHeader as ar, TableRow as nr } from "./components/ui/table.es.js";
|
|
26
26
|
import { Tooltip as dr, TooltipContent as pr, TooltipProvider as lr, TooltipTrigger as mr } from "./components/ui/tooltip.es.js";
|
|
27
27
|
import { Accordion as Sr, AccordionContent as gr, AccordionItem as br, AccordionTrigger as Cr } from "./components/ui/accordion.es.js";
|
|
28
|
-
import { NavigationMenu as Mr, NavigationMenuContent as xr, NavigationMenuIndicator as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
28
|
+
import { NavigationMenu as Mr, NavigationMenuContent as xr, NavigationMenuIndicator as fr, NavigationMenuItem as Dr, NavigationMenuLink as sr, NavigationMenuList as Tr, NavigationMenuListItem as hr, NavigationMenuTrigger as Ir, NavigationMenuViewport as vr, navigationMenuTriggerStyle as wr } from "./components/ui/navigation-menu.es.js";
|
|
29
|
+
import { Toaster as Br } from "./components/ui/sonner.es.js";
|
|
30
|
+
import { useIsMobile as Lr } from "./hooks/use-mobile.es.js";
|
|
31
|
+
import { cn as Nr } from "./utils/index.es.js";
|
|
31
32
|
export {
|
|
32
33
|
Sr as Accordion,
|
|
33
34
|
gr as AccordionContent,
|
|
@@ -44,8 +45,8 @@ export {
|
|
|
44
45
|
g as Button,
|
|
45
46
|
c as Calendar,
|
|
46
47
|
x as Card,
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
f as CardContent,
|
|
49
|
+
D as CardDescription,
|
|
49
50
|
s as CardFooter,
|
|
50
51
|
T as CardHeader,
|
|
51
52
|
h as CardTitle,
|
|
@@ -92,7 +93,7 @@ export {
|
|
|
92
93
|
ce as DropdownMenuSub,
|
|
93
94
|
Me as DropdownMenuSubContent,
|
|
94
95
|
xe as DropdownMenuSubTrigger,
|
|
95
|
-
|
|
96
|
+
fe as DropdownMenuTrigger,
|
|
96
97
|
se as Form,
|
|
97
98
|
Te as FormControl,
|
|
98
99
|
he as FormDescription,
|
|
@@ -105,8 +106,8 @@ export {
|
|
|
105
106
|
Ae as Loader,
|
|
106
107
|
Mr as NavigationMenu,
|
|
107
108
|
xr as NavigationMenuContent,
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
fr as NavigationMenuIndicator,
|
|
110
|
+
Dr as NavigationMenuItem,
|
|
110
111
|
sr as NavigationMenuLink,
|
|
111
112
|
Tr as NavigationMenuList,
|
|
112
113
|
hr as NavigationMenuListItem,
|
|
@@ -142,8 +143,8 @@ export {
|
|
|
142
143
|
co as SheetContent,
|
|
143
144
|
Mo as SheetDescription,
|
|
144
145
|
xo as SheetFooter,
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
fo as SheetHeader,
|
|
147
|
+
Do as SheetOverlay,
|
|
147
148
|
so as SheetPortal,
|
|
148
149
|
To as SheetTitle,
|
|
149
150
|
ho as SheetTrigger,
|
|
@@ -179,16 +180,17 @@ export {
|
|
|
179
180
|
tr as TableHead,
|
|
180
181
|
ar as TableHeader,
|
|
181
182
|
nr as TableRow,
|
|
183
|
+
Br as Toaster,
|
|
182
184
|
dr as Tooltip,
|
|
183
185
|
pr as TooltipContent,
|
|
184
186
|
lr as TooltipProvider,
|
|
185
187
|
mr as TooltipTrigger,
|
|
186
188
|
t as badgeVariants,
|
|
187
189
|
b as buttonVariants,
|
|
188
|
-
|
|
190
|
+
Nr as cn,
|
|
189
191
|
wr as navigationMenuTriggerStyle,
|
|
190
192
|
Be as useFormField,
|
|
191
|
-
|
|
193
|
+
Lr as useIsMobile,
|
|
192
194
|
Wo as useSidebar
|
|
193
195
|
};
|
|
194
196
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.css
CHANGED
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
@apply border-border;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
a {
|
|
65
|
+
@apply link;
|
|
66
|
+
}
|
|
67
|
+
|
|
64
68
|
h1 {
|
|
65
69
|
@apply text-heading-1 my-v3;
|
|
66
70
|
}
|
|
@@ -93,4 +97,10 @@
|
|
|
93
97
|
@apply bg-background text-foreground;
|
|
94
98
|
}
|
|
95
99
|
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@layer components {
|
|
103
|
+
.link {
|
|
104
|
+
@apply text-primary underline hover:underline-offset-2 hover:text-primary/70;
|
|
105
|
+
}
|
|
96
106
|
}
|
package/lib/tokens.css
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
--xprimary-6: 0.5 0.13 var(--primary-hue);
|
|
13
13
|
--xprimary-7: 0.35 0.13 var(--primary-hue);
|
|
14
14
|
--xprimary-8: 0.25 0.13 var(--primary-hue);
|
|
15
|
-
--xprimary-9: 0.
|
|
16
|
-
--xprimary-10: 0.
|
|
15
|
+
--xprimary-9: 0.20 0.09 var(--primary-hue);
|
|
16
|
+
--xprimary-10: 0.10 0.03 var(--primary-hue);
|
|
17
17
|
--primary-1: var(--xprimary-1);
|
|
18
18
|
--primary-2: var(--xprimary-2);
|
|
19
19
|
--primary-3: var(--xprimary-3);
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
--xsecondary-6: 0.5 0.13 var(--secondary-hue);
|
|
34
34
|
--xsecondary-7: 0.35 0.13 var(--secondary-hue);
|
|
35
35
|
--xsecondary-8: 0.25 0.13 var(--secondary-hue);
|
|
36
|
-
--xsecondary-9: 0.
|
|
37
|
-
--xsecondary-10: 0.
|
|
36
|
+
--xsecondary-9: 0.20 0.09 var(--secondary-hue);
|
|
37
|
+
--xsecondary-10: 0.10 0.03 var(--secondary-hue);
|
|
38
38
|
--secondary-1: var(--xsecondary-1);
|
|
39
39
|
--secondary-2: var(--xsecondary-2);
|
|
40
40
|
--secondary-3: var(--xsecondary-3);
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
--xdestructive-6: 0.5 0.13 var(--destructive-hue);
|
|
55
55
|
--xdestructive-7: 0.35 0.13 var(--destructive-hue);
|
|
56
56
|
--xdestructive-8: 0.25 0.13 var(--destructive-hue);
|
|
57
|
-
--xdestructive-9: 0.
|
|
58
|
-
--xdestructive-10: 0.
|
|
57
|
+
--xdestructive-9: 0.20 0.09 var(--destructive-hue);
|
|
58
|
+
--xdestructive-10: 0.10 0.03 var(--destructive-hue);
|
|
59
59
|
--destructive-1: var(--xdestructive-1);
|
|
60
60
|
--destructive-2: var(--xdestructive-2);
|
|
61
61
|
--destructive-3: var(--xdestructive-3);
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
--xsuccess-6: 0.5 0.13 var(--success-hue);
|
|
76
76
|
--xsuccess-7: 0.35 0.13 var(--success-hue);
|
|
77
77
|
--xsuccess-8: 0.25 0.13 var(--success-hue);
|
|
78
|
-
--xsuccess-9: 0.
|
|
79
|
-
--xsuccess-10: 0.
|
|
78
|
+
--xsuccess-9: 0.20 0.09 var(--success-hue);
|
|
79
|
+
--xsuccess-10: 0.10 0.03 var(--success-hue);
|
|
80
80
|
--success-1: var(--xsuccess-1);
|
|
81
81
|
--success-2: var(--xsuccess-2);
|
|
82
82
|
--success-3: var(--xsuccess-3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptlex/web-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "React component library for Cryptlex web applications",
|
|
5
5
|
"author": "Cryptlex",
|
|
6
6
|
"type": "module",
|
|
@@ -49,13 +49,14 @@
|
|
|
49
49
|
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
50
50
|
"@radix-ui/react-icons": "^1.3.0",
|
|
51
51
|
"@radix-ui/react-label": "^2.1.0",
|
|
52
|
+
"@radix-ui/react-navigation-menu": "^1.2.1",
|
|
52
53
|
"@radix-ui/react-popover": "^1.1.2",
|
|
53
54
|
"@radix-ui/react-radio-group": "^1.2.1",
|
|
54
55
|
"@radix-ui/react-select": "^2.1.2",
|
|
55
56
|
"@radix-ui/react-separator": "^1.1.0",
|
|
56
57
|
"@radix-ui/react-slot": "^1.1.0",
|
|
57
58
|
"@radix-ui/react-tooltip": "^1.1.3",
|
|
58
|
-
"
|
|
59
|
+
"sonner": "^1.7.0",
|
|
59
60
|
"@tanstack/react-table": "^8.20.5",
|
|
60
61
|
"class-variance-authority": "^0.7.0",
|
|
61
62
|
"clsx": "^2.1.1",
|
package/tailwind.preset.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { Config } from 'tailwindcss';
|
|
2
2
|
|
|
3
|
+
const tokenRamps = (paletteName: string) => {
|
|
4
|
+
const ramps = {};
|
|
5
|
+
for (let i = 1; i <= 10; i++) {
|
|
6
|
+
ramps[i] = `oklch(var(--${paletteName}-${i}) / <alpha-value>)`
|
|
7
|
+
}
|
|
8
|
+
return ramps;
|
|
9
|
+
}
|
|
3
10
|
export default {
|
|
4
11
|
// Enable dark mode based on class.
|
|
5
12
|
darkMode: ['class'],
|
|
@@ -29,10 +36,15 @@ export default {
|
|
|
29
36
|
primary: {
|
|
30
37
|
DEFAULT: 'oklch(var(--primary) / <alpha-value>)',
|
|
31
38
|
foreground: 'oklch(var(--primary-foreground) / <alpha-value>)',
|
|
39
|
+
...tokenRamps('primary')
|
|
32
40
|
},
|
|
33
41
|
secondary: {
|
|
34
42
|
DEFAULT: 'oklch(var(--secondary) / <alpha-value>)',
|
|
35
43
|
foreground: 'oklch(var(--secondary-foreground) / <alpha-value>)',
|
|
44
|
+
...tokenRamps('secondary')
|
|
45
|
+
},
|
|
46
|
+
neutral: {
|
|
47
|
+
...tokenRamps('neutral')
|
|
36
48
|
},
|
|
37
49
|
muted: {
|
|
38
50
|
DEFAULT: 'oklch(var(--muted) / <alpha-value>)',
|
|
@@ -45,10 +57,12 @@ export default {
|
|
|
45
57
|
destructive: {
|
|
46
58
|
DEFAULT: 'oklch(var(--destructive) / <alpha-value>)',
|
|
47
59
|
foreground: 'oklch(var(--destructive-foreground) / <alpha-value>)',
|
|
60
|
+
...tokenRamps('destructive')
|
|
48
61
|
},
|
|
49
62
|
success: {
|
|
50
63
|
DEFAULT: 'oklch(var(--success) / <alpha-value>)',
|
|
51
64
|
foreground: 'oklch(var(--success-foreground) / <alpha-value>)',
|
|
65
|
+
...tokenRamps('success')
|
|
52
66
|
},
|
|
53
67
|
border: 'oklch(var(--border) / <alpha-value>)',
|
|
54
68
|
input: 'oklch(var(--input) / <alpha-value>)',
|