@arolariu/components 0.0.31 → 0.0.32
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/LICENSE +21 -0
- package/dist/cjs/components/ui/alert-dialog.cjs.map +1 -1
- package/dist/cjs/components/ui/alert.cjs +1 -1
- package/dist/cjs/components/ui/alert.cjs.map +1 -1
- package/dist/cjs/components/ui/aspect-ratio.cjs.map +1 -1
- package/dist/cjs/components/ui/avatar.cjs.map +1 -1
- package/dist/cjs/components/ui/badge.cjs.map +1 -1
- package/dist/cjs/components/ui/breadcrumb.cjs.map +1 -1
- package/dist/cjs/components/ui/button.cjs.map +1 -1
- package/dist/cjs/components/ui/calendar.cjs.map +1 -1
- package/dist/cjs/components/ui/card.cjs.map +1 -1
- package/dist/cjs/components/ui/carousel.cjs.map +1 -1
- package/dist/cjs/components/ui/chart.cjs.map +1 -1
- package/dist/cjs/components/ui/checkbox.cjs.map +1 -1
- package/dist/cjs/components/ui/collapsible.cjs.map +1 -1
- package/dist/cjs/components/ui/command.cjs.map +1 -1
- package/dist/cjs/components/ui/context-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/drawer.cjs.map +1 -1
- package/dist/cjs/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/form.cjs.map +1 -1
- package/dist/cjs/components/ui/hover-card.cjs.map +1 -1
- package/dist/cjs/components/ui/input-otp.cjs.map +1 -1
- package/dist/cjs/components/ui/input.cjs.map +1 -1
- package/dist/cjs/components/ui/label.cjs.map +1 -1
- package/dist/cjs/components/ui/menubar.cjs.map +1 -1
- package/dist/cjs/components/ui/navigation-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/pagination.cjs.map +1 -1
- package/dist/cjs/components/ui/popover.cjs.map +1 -1
- package/dist/cjs/components/ui/progress.cjs.map +1 -1
- package/dist/cjs/components/ui/radio-group.cjs.map +1 -1
- package/dist/cjs/components/ui/resizable.cjs.map +1 -1
- package/dist/cjs/components/ui/scroll-area.cjs.map +1 -1
- package/dist/cjs/components/ui/select.cjs.map +1 -1
- package/dist/cjs/components/ui/separator.cjs.map +1 -1
- package/dist/cjs/components/ui/sheet.cjs.map +1 -1
- package/dist/cjs/components/ui/sidebar.cjs.map +1 -1
- package/dist/cjs/components/ui/skeleton.cjs.map +1 -1
- package/dist/cjs/components/ui/slider.cjs.map +1 -1
- package/dist/cjs/components/ui/sonner.cjs.map +1 -1
- package/dist/cjs/components/ui/switch.cjs.map +1 -1
- package/dist/cjs/components/ui/table.cjs.map +1 -1
- package/dist/cjs/components/ui/tabs.cjs.map +1 -1
- package/dist/cjs/components/ui/textarea.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle-group.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle.cjs.map +1 -1
- package/dist/cjs/components/ui/tooltip.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.css +1 -0
- package/dist/esm/components/ui/alert-dialog.js.map +1 -1
- package/dist/esm/components/ui/alert.js +8 -8
- package/dist/esm/components/ui/alert.js.map +1 -1
- package/dist/esm/components/ui/aspect-ratio.js.map +1 -1
- package/dist/esm/components/ui/avatar.js.map +1 -1
- package/dist/esm/components/ui/badge.js.map +1 -1
- package/dist/esm/components/ui/breadcrumb.js.map +1 -1
- package/dist/esm/components/ui/button.js.map +1 -1
- package/dist/esm/components/ui/calendar.js.map +1 -1
- package/dist/esm/components/ui/card.js.map +1 -1
- package/dist/esm/components/ui/carousel.js.map +1 -1
- package/dist/esm/components/ui/chart.js.map +1 -1
- package/dist/esm/components/ui/checkbox.js.map +1 -1
- package/dist/esm/components/ui/collapsible.js.map +1 -1
- package/dist/esm/components/ui/command.js.map +1 -1
- package/dist/esm/components/ui/context-menu.js.map +1 -1
- package/dist/esm/components/ui/drawer.js.map +1 -1
- package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
- package/dist/esm/components/ui/form.js.map +1 -1
- package/dist/esm/components/ui/hover-card.js.map +1 -1
- package/dist/esm/components/ui/input-otp.js.map +1 -1
- package/dist/esm/components/ui/input.js.map +1 -1
- package/dist/esm/components/ui/label.js.map +1 -1
- package/dist/esm/components/ui/menubar.js.map +1 -1
- package/dist/esm/components/ui/navigation-menu.js.map +1 -1
- package/dist/esm/components/ui/pagination.js.map +1 -1
- package/dist/esm/components/ui/popover.js.map +1 -1
- package/dist/esm/components/ui/progress.js.map +1 -1
- package/dist/esm/components/ui/radio-group.js.map +1 -1
- package/dist/esm/components/ui/resizable.js.map +1 -1
- package/dist/esm/components/ui/scroll-area.js.map +1 -1
- package/dist/esm/components/ui/select.js.map +1 -1
- package/dist/esm/components/ui/separator.js.map +1 -1
- package/dist/esm/components/ui/sheet.js.map +1 -1
- package/dist/esm/components/ui/sidebar.js.map +1 -1
- package/dist/esm/components/ui/skeleton.js.map +1 -1
- package/dist/esm/components/ui/slider.js.map +1 -1
- package/dist/esm/components/ui/sonner.js.map +1 -1
- package/dist/esm/components/ui/switch.js.map +1 -1
- package/dist/esm/components/ui/table.js.map +1 -1
- package/dist/esm/components/ui/tabs.js.map +1 -1
- package/dist/esm/components/ui/textarea.js.map +1 -1
- package/dist/esm/components/ui/toggle-group.js.map +1 -1
- package/dist/esm/components/ui/toggle.js.map +1 -1
- package/dist/esm/components/ui/tooltip.js.map +1 -1
- package/dist/esm/index.css +1 -0
- package/dist/esm/index.js +294 -293
- package/dist/esm/index.js.map +1 -1
- package/dist/index.css +1 -0
- package/dist/index.js +298 -0
- package/dist/types/components/ui/alert.d.ts.map +1 -1
- package/dist/types/components/ui/form.d.ts.map +1 -1
- package/package.json +76 -45
- package/src/components/ui/alert-dialog.tsx +160 -160
- package/src/components/ui/alert.tsx +2 -0
- package/src/components/ui/aspect-ratio.tsx +12 -12
- package/src/components/ui/avatar.tsx +52 -52
- package/src/components/ui/badge.tsx +47 -47
- package/src/components/ui/breadcrumb.tsx +116 -116
- package/src/components/ui/button.tsx +60 -60
- package/src/components/ui/calendar.tsx +75 -75
- package/src/components/ui/card.tsx +79 -79
- package/src/components/ui/carousel.tsx +240 -240
- package/src/components/ui/chart.tsx +352 -352
- package/src/components/ui/checkbox.tsx +31 -31
- package/src/components/ui/collapsible.tsx +34 -34
- package/src/components/ui/command.tsx +176 -176
- package/src/components/ui/context-menu.tsx +254 -254
- package/src/components/ui/drawer.tsx +137 -137
- package/src/components/ui/dropdown-menu.tsx +259 -259
- package/src/components/ui/form.tsx +173 -173
- package/src/components/ui/hover-card.tsx +41 -41
- package/src/components/ui/input-otp.tsx +77 -77
- package/src/components/ui/input.tsx +22 -22
- package/src/components/ui/label.tsx +23 -23
- package/src/components/ui/menubar.tsx +278 -278
- package/src/components/ui/navigation-menu.tsx +170 -170
- package/src/components/ui/pagination.tsx +128 -128
- package/src/components/ui/popover.tsx +47 -47
- package/src/components/ui/progress.tsx +30 -30
- package/src/components/ui/radio-group.tsx +44 -44
- package/src/components/ui/resizable.tsx +55 -55
- package/src/components/ui/scroll-area.tsx +57 -57
- package/src/components/ui/select.tsx +183 -183
- package/src/components/ui/separator.tsx +27 -27
- package/src/components/ui/sheet.tsx +144 -144
- package/src/components/ui/sidebar.tsx +725 -725
- package/src/components/ui/skeleton.tsx +17 -17
- package/src/components/ui/slider.tsx +62 -62
- package/src/components/ui/sonner.tsx +30 -30
- package/src/components/ui/switch.tsx +30 -30
- package/src/components/ui/table.tsx +118 -118
- package/src/components/ui/tabs.tsx +65 -65
- package/src/components/ui/textarea.tsx +19 -19
- package/src/components/ui/toggle-group.tsx +72 -72
- package/src/components/ui/toggle.tsx +46 -46
- package/src/components/ui/tooltip.tsx +60 -60
- package/src/index.css +3 -107
- package/src/index.ts +2 -0
- package/tailwind.config.mjs +67 -0
- package/tsconfig.json +4 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cn } from "./../../lib/utils";
|
|
3
|
-
|
|
4
|
-
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
5
|
-
return (
|
|
6
|
-
<div
|
|
7
|
-
data-slot="skeleton"
|
|
8
|
-
className={cn(
|
|
9
|
-
"bg-neutral-900/10 animate-pulse rounded-md dark:bg-neutral-50/10",
|
|
10
|
-
className
|
|
11
|
-
)}
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { Skeleton };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "./../../lib/utils";
|
|
3
|
+
|
|
4
|
+
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
5
|
+
return (
|
|
6
|
+
<div
|
|
7
|
+
data-slot="skeleton"
|
|
8
|
+
className={cn(
|
|
9
|
+
"bg-neutral-900/10 animate-pulse rounded-md dark:bg-neutral-50/10",
|
|
10
|
+
className
|
|
11
|
+
)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Skeleton };
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5
|
-
import { cn } from "./../../lib/utils";
|
|
6
|
-
|
|
7
|
-
function Slider({
|
|
8
|
-
className,
|
|
9
|
-
defaultValue,
|
|
10
|
-
value,
|
|
11
|
-
min = 0,
|
|
12
|
-
max = 100,
|
|
13
|
-
...props
|
|
14
|
-
}: React.ComponentProps<typeof SliderPrimitive.Root>) {
|
|
15
|
-
const _values = React.useMemo(
|
|
16
|
-
() =>
|
|
17
|
-
Array.isArray(value)
|
|
18
|
-
? value
|
|
19
|
-
: Array.isArray(defaultValue)
|
|
20
|
-
? defaultValue
|
|
21
|
-
: [min, max],
|
|
22
|
-
[value, defaultValue, min, max]
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<SliderPrimitive.Root
|
|
27
|
-
data-slot="slider"
|
|
28
|
-
defaultValue={defaultValue}
|
|
29
|
-
value={value}
|
|
30
|
-
min={min}
|
|
31
|
-
max={max}
|
|
32
|
-
className={cn(
|
|
33
|
-
"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",
|
|
34
|
-
className
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
>
|
|
38
|
-
<SliderPrimitive.Track
|
|
39
|
-
data-slot="slider-track"
|
|
40
|
-
className={cn(
|
|
41
|
-
"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"
|
|
42
|
-
)}
|
|
43
|
-
>
|
|
44
|
-
<SliderPrimitive.Range
|
|
45
|
-
data-slot="slider-range"
|
|
46
|
-
className={cn(
|
|
47
|
-
"bg-neutral-900 absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full dark:bg-neutral-50"
|
|
48
|
-
)}
|
|
49
|
-
/>
|
|
50
|
-
</SliderPrimitive.Track>
|
|
51
|
-
{Array.from({ length: _values.length }, (_, index) => (
|
|
52
|
-
<SliderPrimitive.Thumb
|
|
53
|
-
data-slot="slider-thumb"
|
|
54
|
-
key={index}
|
|
55
|
-
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"
|
|
56
|
-
/>
|
|
57
|
-
))}
|
|
58
|
-
</SliderPrimitive.Root>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { Slider };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5
|
+
import { cn } from "./../../lib/utils";
|
|
6
|
+
|
|
7
|
+
function Slider({
|
|
8
|
+
className,
|
|
9
|
+
defaultValue,
|
|
10
|
+
value,
|
|
11
|
+
min = 0,
|
|
12
|
+
max = 100,
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof SliderPrimitive.Root>) {
|
|
15
|
+
const _values = React.useMemo(
|
|
16
|
+
() =>
|
|
17
|
+
Array.isArray(value)
|
|
18
|
+
? value
|
|
19
|
+
: Array.isArray(defaultValue)
|
|
20
|
+
? defaultValue
|
|
21
|
+
: [min, max],
|
|
22
|
+
[value, defaultValue, min, max]
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<SliderPrimitive.Root
|
|
27
|
+
data-slot="slider"
|
|
28
|
+
defaultValue={defaultValue}
|
|
29
|
+
value={value}
|
|
30
|
+
min={min}
|
|
31
|
+
max={max}
|
|
32
|
+
className={cn(
|
|
33
|
+
"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",
|
|
34
|
+
className
|
|
35
|
+
)}
|
|
36
|
+
{...props}
|
|
37
|
+
>
|
|
38
|
+
<SliderPrimitive.Track
|
|
39
|
+
data-slot="slider-track"
|
|
40
|
+
className={cn(
|
|
41
|
+
"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"
|
|
42
|
+
)}
|
|
43
|
+
>
|
|
44
|
+
<SliderPrimitive.Range
|
|
45
|
+
data-slot="slider-range"
|
|
46
|
+
className={cn(
|
|
47
|
+
"bg-neutral-900 absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full dark:bg-neutral-50"
|
|
48
|
+
)}
|
|
49
|
+
/>
|
|
50
|
+
</SliderPrimitive.Track>
|
|
51
|
+
{Array.from({ length: _values.length }, (_, index) => (
|
|
52
|
+
<SliderPrimitive.Thumb
|
|
53
|
+
data-slot="slider-thumb"
|
|
54
|
+
key={index}
|
|
55
|
+
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"
|
|
56
|
+
/>
|
|
57
|
+
))}
|
|
58
|
+
</SliderPrimitive.Root>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { Slider };
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useTheme } from "next-themes";
|
|
4
|
-
import { Toaster as Sonner, ToasterProps } from "sonner";
|
|
5
|
-
|
|
6
|
-
const Toaster = ({ ...props }: ToasterProps) => {
|
|
7
|
-
const { theme = "system" } = useTheme();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<Sonner
|
|
11
|
-
theme={theme as ToasterProps["theme"]}
|
|
12
|
-
className="toaster group"
|
|
13
|
-
toastOptions={{
|
|
14
|
-
classNames: {
|
|
15
|
-
toast:
|
|
16
|
-
"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",
|
|
17
|
-
description:
|
|
18
|
-
"group-[.toast]:text-neutral-500 dark:group-[.toast]:text-neutral-400",
|
|
19
|
-
actionButton:
|
|
20
|
-
"group-[.toast]:bg-neutral-900 group-[.toast]:text-neutral-50 font-medium dark:group-[.toast]:bg-neutral-50 dark:group-[.toast]:text-neutral-900",
|
|
21
|
-
cancelButton:
|
|
22
|
-
"group-[.toast]:bg-neutral-100 group-[.toast]:text-neutral-500 font-medium dark:group-[.toast]:bg-neutral-800 dark:group-[.toast]:text-neutral-400",
|
|
23
|
-
},
|
|
24
|
-
}}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export { Toaster };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useTheme } from "next-themes";
|
|
4
|
+
import { Toaster as Sonner, ToasterProps } from "sonner";
|
|
5
|
+
|
|
6
|
+
const Toaster = ({ ...props }: ToasterProps) => {
|
|
7
|
+
const { theme = "system" } = useTheme();
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<Sonner
|
|
11
|
+
theme={theme as ToasterProps["theme"]}
|
|
12
|
+
className="toaster group"
|
|
13
|
+
toastOptions={{
|
|
14
|
+
classNames: {
|
|
15
|
+
toast:
|
|
16
|
+
"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",
|
|
17
|
+
description:
|
|
18
|
+
"group-[.toast]:text-neutral-500 dark:group-[.toast]:text-neutral-400",
|
|
19
|
+
actionButton:
|
|
20
|
+
"group-[.toast]:bg-neutral-900 group-[.toast]:text-neutral-50 font-medium dark:group-[.toast]:bg-neutral-50 dark:group-[.toast]:text-neutral-900",
|
|
21
|
+
cancelButton:
|
|
22
|
+
"group-[.toast]:bg-neutral-100 group-[.toast]:text-neutral-500 font-medium dark:group-[.toast]:bg-neutral-800 dark:group-[.toast]:text-neutral-400",
|
|
23
|
+
},
|
|
24
|
+
}}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { Toaster };
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
5
|
-
import { cn } from "./../../lib/utils";
|
|
6
|
-
|
|
7
|
-
function Switch({
|
|
8
|
-
className,
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof SwitchPrimitive.Root>) {
|
|
11
|
-
return (
|
|
12
|
-
<SwitchPrimitive.Root
|
|
13
|
-
data-slot="switch"
|
|
14
|
-
className={cn(
|
|
15
|
-
"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",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
<SwitchPrimitive.Thumb
|
|
21
|
-
data-slot="switch-thumb"
|
|
22
|
-
className={cn(
|
|
23
|
-
"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"
|
|
24
|
-
)}
|
|
25
|
-
/>
|
|
26
|
-
</SwitchPrimitive.Root>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { Switch };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
5
|
+
import { cn } from "./../../lib/utils";
|
|
6
|
+
|
|
7
|
+
function Switch({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof SwitchPrimitive.Root>) {
|
|
11
|
+
return (
|
|
12
|
+
<SwitchPrimitive.Root
|
|
13
|
+
data-slot="switch"
|
|
14
|
+
className={cn(
|
|
15
|
+
"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",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
<SwitchPrimitive.Thumb
|
|
21
|
+
data-slot="switch-thumb"
|
|
22
|
+
className={cn(
|
|
23
|
+
"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"
|
|
24
|
+
)}
|
|
25
|
+
/>
|
|
26
|
+
</SwitchPrimitive.Root>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { Switch };
|
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { cn } from "./../../lib/utils";
|
|
5
|
-
|
|
6
|
-
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
data-slot="table-container"
|
|
10
|
-
className="relative w-full overflow-x-auto"
|
|
11
|
-
>
|
|
12
|
-
<table
|
|
13
|
-
data-slot="table"
|
|
14
|
-
className={cn("w-full caption-bottom text-sm", className)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
22
|
-
return (
|
|
23
|
-
<thead
|
|
24
|
-
data-slot="table-header"
|
|
25
|
-
className={cn("[&_tr]:border-b", className)}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
32
|
-
return (
|
|
33
|
-
<tbody
|
|
34
|
-
data-slot="table-body"
|
|
35
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
42
|
-
return (
|
|
43
|
-
<tfoot
|
|
44
|
-
data-slot="table-footer"
|
|
45
|
-
className={cn(
|
|
46
|
-
"bg-neutral-100/50 border-t font-medium [&>tr]:last:border-b-0 dark:bg-neutral-800/50",
|
|
47
|
-
className
|
|
48
|
-
)}
|
|
49
|
-
{...props}
|
|
50
|
-
/>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
55
|
-
return (
|
|
56
|
-
<tr
|
|
57
|
-
data-slot="table-row"
|
|
58
|
-
className={cn(
|
|
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
|
-
className
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
68
|
-
return (
|
|
69
|
-
<th
|
|
70
|
-
data-slot="table-head"
|
|
71
|
-
className={cn(
|
|
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
|
-
className
|
|
74
|
-
)}
|
|
75
|
-
{...props}
|
|
76
|
-
/>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
81
|
-
return (
|
|
82
|
-
<td
|
|
83
|
-
data-slot="table-cell"
|
|
84
|
-
className={cn(
|
|
85
|
-
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
86
|
-
className
|
|
87
|
-
)}
|
|
88
|
-
{...props}
|
|
89
|
-
/>
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function TableCaption({
|
|
94
|
-
className,
|
|
95
|
-
...props
|
|
96
|
-
}: React.ComponentProps<"caption">) {
|
|
97
|
-
return (
|
|
98
|
-
<caption
|
|
99
|
-
data-slot="table-caption"
|
|
100
|
-
className={cn(
|
|
101
|
-
"text-neutral-500 mt-4 text-sm dark:text-neutral-400",
|
|
102
|
-
className
|
|
103
|
-
)}
|
|
104
|
-
{...props}
|
|
105
|
-
/>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export {
|
|
110
|
-
Table,
|
|
111
|
-
TableHeader,
|
|
112
|
-
TableBody,
|
|
113
|
-
TableFooter,
|
|
114
|
-
TableHead,
|
|
115
|
-
TableRow,
|
|
116
|
-
TableCell,
|
|
117
|
-
TableCaption,
|
|
118
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "./../../lib/utils";
|
|
5
|
+
|
|
6
|
+
function Table({ className, ...props }: React.ComponentProps<"table">) {
|
|
7
|
+
return (
|
|
8
|
+
<div
|
|
9
|
+
data-slot="table-container"
|
|
10
|
+
className="relative w-full overflow-x-auto"
|
|
11
|
+
>
|
|
12
|
+
<table
|
|
13
|
+
data-slot="table"
|
|
14
|
+
className={cn("w-full caption-bottom text-sm", className)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
|
|
22
|
+
return (
|
|
23
|
+
<thead
|
|
24
|
+
data-slot="table-header"
|
|
25
|
+
className={cn("[&_tr]:border-b", className)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
|
|
32
|
+
return (
|
|
33
|
+
<tbody
|
|
34
|
+
data-slot="table-body"
|
|
35
|
+
className={cn("[&_tr:last-child]:border-0", className)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
|
|
42
|
+
return (
|
|
43
|
+
<tfoot
|
|
44
|
+
data-slot="table-footer"
|
|
45
|
+
className={cn(
|
|
46
|
+
"bg-neutral-100/50 border-t font-medium [&>tr]:last:border-b-0 dark:bg-neutral-800/50",
|
|
47
|
+
className
|
|
48
|
+
)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
|
|
55
|
+
return (
|
|
56
|
+
<tr
|
|
57
|
+
data-slot="table-row"
|
|
58
|
+
className={cn(
|
|
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
|
+
className
|
|
61
|
+
)}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
68
|
+
return (
|
|
69
|
+
<th
|
|
70
|
+
data-slot="table-head"
|
|
71
|
+
className={cn(
|
|
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
|
+
className
|
|
74
|
+
)}
|
|
75
|
+
{...props}
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
81
|
+
return (
|
|
82
|
+
<td
|
|
83
|
+
data-slot="table-cell"
|
|
84
|
+
className={cn(
|
|
85
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
86
|
+
className
|
|
87
|
+
)}
|
|
88
|
+
{...props}
|
|
89
|
+
/>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function TableCaption({
|
|
94
|
+
className,
|
|
95
|
+
...props
|
|
96
|
+
}: React.ComponentProps<"caption">) {
|
|
97
|
+
return (
|
|
98
|
+
<caption
|
|
99
|
+
data-slot="table-caption"
|
|
100
|
+
className={cn(
|
|
101
|
+
"text-neutral-500 mt-4 text-sm dark:text-neutral-400",
|
|
102
|
+
className
|
|
103
|
+
)}
|
|
104
|
+
{...props}
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export {
|
|
110
|
+
Table,
|
|
111
|
+
TableHeader,
|
|
112
|
+
TableBody,
|
|
113
|
+
TableFooter,
|
|
114
|
+
TableHead,
|
|
115
|
+
TableRow,
|
|
116
|
+
TableCell,
|
|
117
|
+
TableCaption,
|
|
118
|
+
};
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
5
|
-
import { cn } from "./../../lib/utils";
|
|
6
|
-
|
|
7
|
-
function Tabs({
|
|
8
|
-
className,
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
11
|
-
return (
|
|
12
|
-
<TabsPrimitive.Root
|
|
13
|
-
data-slot="tabs"
|
|
14
|
-
className={cn("flex flex-col gap-2", className)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function TabsList({
|
|
21
|
-
className,
|
|
22
|
-
...props
|
|
23
|
-
}: React.ComponentProps<typeof TabsPrimitive.List>) {
|
|
24
|
-
return (
|
|
25
|
-
<TabsPrimitive.List
|
|
26
|
-
data-slot="tabs-list"
|
|
27
|
-
className={cn(
|
|
28
|
-
"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",
|
|
29
|
-
className
|
|
30
|
-
)}
|
|
31
|
-
{...props}
|
|
32
|
-
/>
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function TabsTrigger({
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
|
|
40
|
-
return (
|
|
41
|
-
<TabsPrimitive.Trigger
|
|
42
|
-
data-slot="tabs-trigger"
|
|
43
|
-
className={cn(
|
|
44
|
-
"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",
|
|
45
|
-
className
|
|
46
|
-
)}
|
|
47
|
-
{...props}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function TabsContent({
|
|
53
|
-
className,
|
|
54
|
-
...props
|
|
55
|
-
}: React.ComponentProps<typeof TabsPrimitive.Content>) {
|
|
56
|
-
return (
|
|
57
|
-
<TabsPrimitive.Content
|
|
58
|
-
data-slot="tabs-content"
|
|
59
|
-
className={cn("flex-1 outline-none", className)}
|
|
60
|
-
{...props}
|
|
61
|
-
/>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
5
|
+
import { cn } from "./../../lib/utils";
|
|
6
|
+
|
|
7
|
+
function Tabs({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
11
|
+
return (
|
|
12
|
+
<TabsPrimitive.Root
|
|
13
|
+
data-slot="tabs"
|
|
14
|
+
className={cn("flex flex-col gap-2", className)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function TabsList({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof TabsPrimitive.List>) {
|
|
24
|
+
return (
|
|
25
|
+
<TabsPrimitive.List
|
|
26
|
+
data-slot="tabs-list"
|
|
27
|
+
className={cn(
|
|
28
|
+
"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",
|
|
29
|
+
className
|
|
30
|
+
)}
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function TabsTrigger({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
|
|
40
|
+
return (
|
|
41
|
+
<TabsPrimitive.Trigger
|
|
42
|
+
data-slot="tabs-trigger"
|
|
43
|
+
className={cn(
|
|
44
|
+
"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",
|
|
45
|
+
className
|
|
46
|
+
)}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function TabsContent({
|
|
53
|
+
className,
|
|
54
|
+
...props
|
|
55
|
+
}: React.ComponentProps<typeof TabsPrimitive.Content>) {
|
|
56
|
+
return (
|
|
57
|
+
<TabsPrimitive.Content
|
|
58
|
+
data-slot="tabs-content"
|
|
59
|
+
className={cn("flex-1 outline-none", className)}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|