@arolariu/components 0.0.11 → 0.0.13
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/ui/alert-dialog.js +1 -1
- package/dist/cjs/components/ui/carousel.js +1 -1
- package/dist/cjs/components/ui/menubar.js +1 -1
- package/dist/cjs/components/ui/pagination.js +1 -1
- package/dist/cjs/components/ui/popover.js +1 -1
- package/dist/cjs/components/ui/scroll-area.js +1 -1
- package/dist/cjs/components/ui/sidebar.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/components/ui/accordion.js +50 -8
- package/dist/es/components/ui/alert-dialog.js +118 -22
- package/dist/es/components/ui/alert.js +52 -14
- package/dist/es/components/ui/aspect-ratio.js +4 -2
- package/dist/es/components/ui/avatar.js +42 -6
- package/dist/es/components/ui/badge.js +28 -13
- package/dist/es/components/ui/breadcrumb.js +78 -10
- package/dist/es/components/ui/button.js +37 -21
- package/dist/es/components/ui/calendar.js +52 -29
- package/dist/es/components/ui/card.js +51 -6
- package/dist/es/components/ui/carousel.js +142 -32
- package/dist/es/components/ui/chart.js +169 -42
- package/dist/es/components/ui/checkbox.js +23 -2
- package/dist/es/components/ui/collapsible.js +24 -6
- package/dist/es/components/ui/command.js +136 -18
- package/dist/es/components/ui/context-menu.js +187 -30
- package/dist/es/components/ui/dialog.js +100 -18
- package/dist/es/components/ui/drawer.js +98 -18
- package/dist/es/components/ui/dropdown-menu.js +195 -30
- package/dist/es/components/ui/form.js +59 -8
- package/dist/es/components/ui/hover-card.js +30 -9
- package/dist/es/components/ui/input-otp.js +47 -6
- package/dist/es/components/ui/input.js +14 -1
- package/dist/es/components/ui/label.js +15 -2
- package/dist/es/components/ui/menubar.js +228 -47
- package/dist/es/components/ui/navigation-menu.js +146 -17
- package/dist/es/components/ui/pagination.js +96 -15
- package/dist/es/components/ui/popover.js +33 -10
- package/dist/es/components/ui/progress.js +24 -2
- package/dist/es/components/ui/radio-group.js +35 -4
- package/dist/es/components/ui/resizable.js +36 -6
- package/dist/es/components/ui/scroll-area.js +51 -4
- package/dist/es/components/ui/select.js +143 -22
- package/dist/es/components/ui/separator.js +19 -2
- package/dist/es/components/ui/sheet.js +99 -17
- package/dist/es/components/ui/sidebar.js +512 -112
- package/dist/es/components/ui/skeleton.js +8 -1
- package/dist/es/components/ui/slider.js +56 -4
- package/dist/es/components/ui/sonner.js +15 -7
- package/dist/es/components/ui/switch.js +24 -2
- package/dist/es/components/ui/table.js +87 -9
- package/dist/es/components/ui/tabs.js +54 -8
- package/dist/es/components/ui/textarea.js +11 -1
- package/dist/es/components/ui/toggle-group.js +48 -9
- package/dist/es/components/ui/toggle.js +31 -16
- package/dist/es/components/ui/tooltip.js +45 -11
- package/dist/types/index.d.ts +46 -46
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +12 -2
- package/dist/umd/arolariu-components.umd.js +0 -7
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { cn as n } from "../../lib/utils.js";
|
|
3
3
|
function l({ className: e, ...t }) {
|
|
4
|
-
return
|
|
4
|
+
return /* @__PURE__ */ r(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "skeleton",
|
|
8
|
+
className: n("bg-neutral-900/10 animate-pulse rounded-md dark:bg-neutral-50/10", e),
|
|
9
|
+
...t
|
|
10
|
+
}
|
|
11
|
+
);
|
|
5
12
|
}
|
|
6
13
|
export {
|
|
7
14
|
l as Skeleton
|
|
@@ -1,10 +1,62 @@
|
|
|
1
1
|
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as h from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-slider";
|
|
4
|
-
import { cn as
|
|
5
|
-
function g({
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { cn as n } from "../../lib/utils.js";
|
|
5
|
+
function g({
|
|
6
|
+
className: l,
|
|
7
|
+
defaultValue: r,
|
|
8
|
+
value: a,
|
|
9
|
+
min: e = 0,
|
|
10
|
+
max: o = 100,
|
|
11
|
+
...d
|
|
12
|
+
}) {
|
|
13
|
+
const s = h.useMemo(
|
|
14
|
+
() => Array.isArray(a) ? a : Array.isArray(r) ? r : [e, o],
|
|
15
|
+
[a, r, e, o]
|
|
16
|
+
);
|
|
17
|
+
return /* @__PURE__ */ u(
|
|
18
|
+
t.Root,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "slider",
|
|
21
|
+
defaultValue: r,
|
|
22
|
+
value: a,
|
|
23
|
+
min: e,
|
|
24
|
+
max: o,
|
|
25
|
+
className: n(
|
|
26
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
27
|
+
l
|
|
28
|
+
),
|
|
29
|
+
...d,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ i(
|
|
32
|
+
t.Track,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "slider-track",
|
|
35
|
+
className: n(
|
|
36
|
+
"bg-neutral-100 relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5 dark:bg-neutral-800"
|
|
37
|
+
),
|
|
38
|
+
children: /* @__PURE__ */ i(
|
|
39
|
+
t.Range,
|
|
40
|
+
{
|
|
41
|
+
"data-slot": "slider-range",
|
|
42
|
+
className: n(
|
|
43
|
+
"bg-neutral-900 absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full dark:bg-neutral-50"
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
Array.from({ length: s.length }, (b, c) => /* @__PURE__ */ i(
|
|
50
|
+
t.Thumb,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "slider-thumb",
|
|
53
|
+
className: "border-neutral-900 bg-white ring-neutral-950/50 block size-4 shrink-0 rounded-full border border-neutral-200 shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 dark:border-neutral-50 dark:bg-neutral-950 dark:ring-neutral-300/50 dark:border-neutral-800"
|
|
54
|
+
},
|
|
55
|
+
c
|
|
56
|
+
))
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
8
60
|
}
|
|
9
61
|
export {
|
|
10
62
|
g as Slider
|
|
@@ -3,14 +3,22 @@ import { useTheme as a } from "next-themes";
|
|
|
3
3
|
import { Toaster as e } from "sonner";
|
|
4
4
|
const n = ({ ...t }) => {
|
|
5
5
|
const { theme: r = "system" } = a();
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
return /* @__PURE__ */ o(
|
|
7
|
+
e,
|
|
8
|
+
{
|
|
9
|
+
theme: r,
|
|
10
|
+
className: "toaster group",
|
|
11
|
+
toastOptions: {
|
|
12
|
+
classNames: {
|
|
13
|
+
toast: "group toast group-[.toaster]:bg-white group-[.toaster]:text-neutral-950 group-[.toaster]:border-neutral-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-neutral-950 dark:group-[.toaster]:text-neutral-50 dark:group-[.toaster]:border-neutral-800",
|
|
14
|
+
description: "group-[.toast]:text-neutral-500 dark:group-[.toast]:text-neutral-400",
|
|
15
|
+
actionButton: "group-[.toast]:bg-neutral-900 group-[.toast]:text-neutral-50 font-medium dark:group-[.toast]:bg-neutral-50 dark:group-[.toast]:text-neutral-900",
|
|
16
|
+
cancelButton: "group-[.toast]:bg-neutral-100 group-[.toast]:text-neutral-500 font-medium dark:group-[.toast]:bg-neutral-800 dark:group-[.toast]:text-neutral-400"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
...t
|
|
12
20
|
}
|
|
13
|
-
|
|
21
|
+
);
|
|
14
22
|
};
|
|
15
23
|
export {
|
|
16
24
|
n as Toaster
|
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "@radix-ui/react-switch";
|
|
3
3
|
import { cn as a } from "../../lib/utils.js";
|
|
4
|
-
function o({
|
|
5
|
-
|
|
4
|
+
function o({
|
|
5
|
+
className: r,
|
|
6
|
+
...n
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
|
+
t.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "switch",
|
|
12
|
+
className: a(
|
|
13
|
+
"peer data-[state=checked]:bg-neutral-900 data-[state=unchecked]:bg-neutral-200 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=unchecked]:bg-neutral-800 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50",
|
|
14
|
+
r
|
|
15
|
+
),
|
|
16
|
+
...n,
|
|
17
|
+
children: /* @__PURE__ */ e(
|
|
18
|
+
t.Thumb,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "switch-thumb",
|
|
21
|
+
className: a(
|
|
22
|
+
"bg-white pointer-events-none block size-4 rounded-full ring-0 shadow-lg transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 dark:bg-neutral-950"
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
6
28
|
}
|
|
7
29
|
export {
|
|
8
30
|
o as Switch
|
|
@@ -1,28 +1,106 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cn as l } from "../../lib/utils.js";
|
|
3
3
|
function n({ className: t, ...e }) {
|
|
4
|
-
return
|
|
4
|
+
return /* @__PURE__ */ a(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "table-container",
|
|
8
|
+
className: "relative w-full overflow-x-auto",
|
|
9
|
+
children: /* @__PURE__ */ a(
|
|
10
|
+
"table",
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "table",
|
|
13
|
+
className: l("w-full caption-bottom text-sm", t),
|
|
14
|
+
...e
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
);
|
|
5
19
|
}
|
|
6
20
|
function s({ className: t, ...e }) {
|
|
7
|
-
return
|
|
21
|
+
return /* @__PURE__ */ a(
|
|
22
|
+
"thead",
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "table-header",
|
|
25
|
+
className: l("[&_tr]:border-b", t),
|
|
26
|
+
...e
|
|
27
|
+
}
|
|
28
|
+
);
|
|
8
29
|
}
|
|
9
30
|
function d({ className: t, ...e }) {
|
|
10
|
-
return
|
|
31
|
+
return /* @__PURE__ */ a(
|
|
32
|
+
"tbody",
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "table-body",
|
|
35
|
+
className: l("[&_tr:last-child]:border-0", t),
|
|
36
|
+
...e
|
|
37
|
+
}
|
|
38
|
+
);
|
|
11
39
|
}
|
|
12
40
|
function b({ className: t, ...e }) {
|
|
13
|
-
return
|
|
41
|
+
return /* @__PURE__ */ a(
|
|
42
|
+
"tfoot",
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "table-footer",
|
|
45
|
+
className: l(
|
|
46
|
+
"bg-neutral-100/50 border-t font-medium [&>tr]:last:border-b-0 dark:bg-neutral-800/50",
|
|
47
|
+
t
|
|
48
|
+
),
|
|
49
|
+
...e
|
|
50
|
+
}
|
|
51
|
+
);
|
|
14
52
|
}
|
|
15
53
|
function c({ className: t, ...e }) {
|
|
16
|
-
return
|
|
54
|
+
return /* @__PURE__ */ a(
|
|
55
|
+
"tr",
|
|
56
|
+
{
|
|
57
|
+
"data-slot": "table-row",
|
|
58
|
+
className: l(
|
|
59
|
+
"hover:bg-neutral-100/50 data-[state=selected]:bg-neutral-100 border-b transition-colors dark:hover:bg-neutral-800/50 dark:data-[state=selected]:bg-neutral-800",
|
|
60
|
+
t
|
|
61
|
+
),
|
|
62
|
+
...e
|
|
63
|
+
}
|
|
64
|
+
);
|
|
17
65
|
}
|
|
18
66
|
function u({ className: t, ...e }) {
|
|
19
|
-
return
|
|
67
|
+
return /* @__PURE__ */ a(
|
|
68
|
+
"th",
|
|
69
|
+
{
|
|
70
|
+
"data-slot": "table-head",
|
|
71
|
+
className: l(
|
|
72
|
+
"text-neutral-500 h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] dark:text-neutral-400",
|
|
73
|
+
t
|
|
74
|
+
),
|
|
75
|
+
...e
|
|
76
|
+
}
|
|
77
|
+
);
|
|
20
78
|
}
|
|
21
79
|
function i({ className: t, ...e }) {
|
|
22
|
-
return
|
|
80
|
+
return /* @__PURE__ */ a(
|
|
81
|
+
"td",
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "table-cell",
|
|
84
|
+
className: l(
|
|
85
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
86
|
+
t
|
|
87
|
+
),
|
|
88
|
+
...e
|
|
89
|
+
}
|
|
90
|
+
);
|
|
23
91
|
}
|
|
24
|
-
function m({
|
|
25
|
-
|
|
92
|
+
function m({
|
|
93
|
+
className: t,
|
|
94
|
+
...e
|
|
95
|
+
}) {
|
|
96
|
+
return /* @__PURE__ */ a(
|
|
97
|
+
"caption",
|
|
98
|
+
{
|
|
99
|
+
"data-slot": "table-caption",
|
|
100
|
+
className: l("text-neutral-500 mt-4 text-sm dark:text-neutral-400", t),
|
|
101
|
+
...e
|
|
102
|
+
}
|
|
103
|
+
);
|
|
26
104
|
}
|
|
27
105
|
export {
|
|
28
106
|
n as Table,
|
|
@@ -1,17 +1,63 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "@radix-ui/react-tabs";
|
|
3
3
|
import { cn as i } from "../../lib/utils.js";
|
|
4
|
-
function o({
|
|
5
|
-
|
|
4
|
+
function o({
|
|
5
|
+
className: t,
|
|
6
|
+
...e
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ a(
|
|
9
|
+
s.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "tabs",
|
|
12
|
+
className: i("flex flex-col gap-2", t),
|
|
13
|
+
...e
|
|
14
|
+
}
|
|
15
|
+
);
|
|
6
16
|
}
|
|
7
|
-
function l({
|
|
8
|
-
|
|
17
|
+
function l({
|
|
18
|
+
className: t,
|
|
19
|
+
...e
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ a(
|
|
22
|
+
s.List,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "tabs-list",
|
|
25
|
+
className: i(
|
|
26
|
+
"bg-neutral-100 text-neutral-500 inline-flex h-9 w-fit items-center justify-center rounded-lg p-1 dark:bg-neutral-800 dark:text-neutral-400",
|
|
27
|
+
t
|
|
28
|
+
),
|
|
29
|
+
...e
|
|
30
|
+
}
|
|
31
|
+
);
|
|
9
32
|
}
|
|
10
|
-
function u({
|
|
11
|
-
|
|
33
|
+
function u({
|
|
34
|
+
className: t,
|
|
35
|
+
...e
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ a(
|
|
38
|
+
s.Trigger,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "tabs-trigger",
|
|
41
|
+
className: i(
|
|
42
|
+
"data-[state=active]:bg-white data-[state=active]:text-neutral-950 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:outline-ring inline-flex items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:data-[state=active]:bg-neutral-950 dark:data-[state=active]:text-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50",
|
|
43
|
+
t
|
|
44
|
+
),
|
|
45
|
+
...e
|
|
46
|
+
}
|
|
47
|
+
);
|
|
12
48
|
}
|
|
13
|
-
function c({
|
|
14
|
-
|
|
49
|
+
function c({
|
|
50
|
+
className: t,
|
|
51
|
+
...e
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */ a(
|
|
54
|
+
s.Content,
|
|
55
|
+
{
|
|
56
|
+
"data-slot": "tabs-content",
|
|
57
|
+
className: i("flex-1 outline-none", t),
|
|
58
|
+
...e
|
|
59
|
+
}
|
|
60
|
+
);
|
|
15
61
|
}
|
|
16
62
|
export {
|
|
17
63
|
o as Tabs,
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cn as i } from "../../lib/utils.js";
|
|
3
3
|
function t({ className: r, ...a }) {
|
|
4
|
-
return
|
|
4
|
+
return /* @__PURE__ */ e(
|
|
5
|
+
"textarea",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "textarea",
|
|
8
|
+
className: i(
|
|
9
|
+
"border-neutral-200 placeholder:text-neutral-500 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-neutral-800 dark:placeholder:text-neutral-400 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
10
|
+
r
|
|
11
|
+
),
|
|
12
|
+
...a
|
|
13
|
+
}
|
|
14
|
+
);
|
|
5
15
|
}
|
|
6
16
|
export {
|
|
7
17
|
t as Textarea
|
|
@@ -1,21 +1,60 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
3
|
+
import * as s from "@radix-ui/react-toggle-group";
|
|
4
|
+
import { cn as l } from "../../lib/utils.js";
|
|
5
5
|
import { toggleVariants as m } from "./toggle.js";
|
|
6
6
|
const u = d.createContext({
|
|
7
7
|
size: "default",
|
|
8
8
|
variant: "default"
|
|
9
9
|
});
|
|
10
|
-
function p({
|
|
11
|
-
|
|
10
|
+
function p({
|
|
11
|
+
className: a,
|
|
12
|
+
variant: o,
|
|
13
|
+
size: t,
|
|
14
|
+
children: e,
|
|
15
|
+
...i
|
|
16
|
+
}) {
|
|
17
|
+
return /* @__PURE__ */ n(
|
|
18
|
+
s.Root,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "toggle-group",
|
|
21
|
+
"data-variant": o,
|
|
22
|
+
"data-size": t,
|
|
23
|
+
className: l(
|
|
24
|
+
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
25
|
+
a
|
|
26
|
+
),
|
|
27
|
+
...i,
|
|
28
|
+
children: /* @__PURE__ */ n(u.Provider, { value: { variant: o, size: t }, children: e })
|
|
29
|
+
}
|
|
30
|
+
);
|
|
12
31
|
}
|
|
13
|
-
function v({
|
|
32
|
+
function v({
|
|
33
|
+
className: a,
|
|
34
|
+
children: o,
|
|
35
|
+
variant: t,
|
|
36
|
+
size: e,
|
|
37
|
+
...i
|
|
38
|
+
}) {
|
|
14
39
|
const r = d.useContext(u);
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
40
|
+
return /* @__PURE__ */ n(
|
|
41
|
+
s.Item,
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "toggle-group-item",
|
|
44
|
+
"data-variant": r.variant || t,
|
|
45
|
+
"data-size": r.size || e,
|
|
46
|
+
className: l(
|
|
47
|
+
m({
|
|
48
|
+
variant: r.variant || t,
|
|
49
|
+
size: r.size || e
|
|
50
|
+
}),
|
|
51
|
+
"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
52
|
+
a
|
|
53
|
+
),
|
|
54
|
+
...i,
|
|
55
|
+
children: o
|
|
56
|
+
}
|
|
57
|
+
);
|
|
19
58
|
}
|
|
20
59
|
export {
|
|
21
60
|
p as ToggleGroup,
|
|
@@ -2,25 +2,40 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import * as i from "@radix-ui/react-toggle";
|
|
3
3
|
import { cva as o } from "class-variance-authority";
|
|
4
4
|
import { cn as d } from "../../lib/utils.js";
|
|
5
|
-
const l = o(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
const l = o(
|
|
6
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-neutral-100 hover:text-neutral-500 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-neutral-100 data-[state=on]:text-neutral-900 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 whitespace-nowrap dark:hover:bg-neutral-800 dark:hover:text-neutral-400 dark:data-[state=on]:bg-neutral-800 dark:data-[state=on]:text-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-transparent",
|
|
11
|
+
outline: "border border-neutral-200 bg-transparent shadow-xs hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:hover:bg-neutral-800 dark:hover:text-neutral-50"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
default: "h-9 px-2 min-w-9",
|
|
15
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
16
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
17
|
+
}
|
|
10
18
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
lg: "h-10 px-2.5 min-w-10"
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
size: "default"
|
|
15
22
|
}
|
|
16
|
-
},
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
variant: "default",
|
|
19
|
-
size: "default"
|
|
20
23
|
}
|
|
21
|
-
|
|
22
|
-
function g({
|
|
23
|
-
|
|
24
|
+
);
|
|
25
|
+
function g({
|
|
26
|
+
className: r,
|
|
27
|
+
variant: e,
|
|
28
|
+
size: a,
|
|
29
|
+
...t
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ n(
|
|
32
|
+
i.Root,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "toggle",
|
|
35
|
+
className: d(l({ variant: e, size: a, className: r })),
|
|
36
|
+
...t
|
|
37
|
+
}
|
|
38
|
+
);
|
|
24
39
|
}
|
|
25
40
|
export {
|
|
26
41
|
g as Toggle,
|
|
@@ -1,21 +1,55 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "@radix-ui/react-tooltip";
|
|
3
|
-
import { cn as
|
|
4
|
-
function
|
|
5
|
-
|
|
3
|
+
import { cn as l } from "../../lib/utils.js";
|
|
4
|
+
function d({
|
|
5
|
+
delayDuration: t = 0,
|
|
6
|
+
...r
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
|
+
o.Provider,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "tooltip-provider",
|
|
12
|
+
delayDuration: t,
|
|
13
|
+
...r
|
|
14
|
+
}
|
|
15
|
+
);
|
|
6
16
|
}
|
|
7
|
-
function p({
|
|
8
|
-
|
|
17
|
+
function p({
|
|
18
|
+
...t
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(o.Root, { "data-slot": "tooltip", ...t }) });
|
|
9
21
|
}
|
|
10
|
-
function u({
|
|
11
|
-
|
|
22
|
+
function u({
|
|
23
|
+
...t
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ e(o.Trigger, { "data-slot": "tooltip-trigger", ...t });
|
|
12
26
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
27
|
+
function c({
|
|
28
|
+
className: t,
|
|
29
|
+
sideOffset: r = 0,
|
|
30
|
+
children: a,
|
|
31
|
+
...i
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ e(o.Portal, { children: /* @__PURE__ */ n(
|
|
34
|
+
o.Content,
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "tooltip-content",
|
|
37
|
+
sideOffset: r,
|
|
38
|
+
className: l(
|
|
39
|
+
"bg-neutral-900 text-neutral-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance dark:bg-neutral-50 dark:text-neutral-900",
|
|
40
|
+
t
|
|
41
|
+
),
|
|
42
|
+
...i,
|
|
43
|
+
children: [
|
|
44
|
+
a,
|
|
45
|
+
/* @__PURE__ */ e(o.Arrow, { className: "bg-neutral-900 fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] dark:bg-neutral-50" })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
15
49
|
}
|
|
16
50
|
export {
|
|
17
51
|
p as Tooltip,
|
|
18
|
-
|
|
19
|
-
|
|
52
|
+
c as TooltipContent,
|
|
53
|
+
d as TooltipProvider,
|
|
20
54
|
u as TooltipTrigger
|
|
21
55
|
};
|