@majapisoftwares/ui 6.1.0 → 6.1.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/AGENTS.md +27 -27
- package/README.md +79 -79
- package/THIRD_PARTY_NOTICES.md +39 -39
- package/components.json +25 -25
- package/docs/MIGRATION-0.2.md +20 -20
- package/docs/MIGRATION-6.0.md +33 -33
- package/docs/NEXT-STARTER-VALIDATION.md +14 -14
- package/docs/STANDARDS.md +41 -41
- package/docs/VALIDATION.md +11 -11
- package/docs/VERSIONING.md +28 -28
- package/docs/validation/preference-titles.md +22 -0
- package/package.json +88 -84
- package/scripts/check-standards.mjs +41 -41
- package/src/components/ui/accordion.tsx +82 -82
- package/src/components/ui/alert-dialog.tsx +187 -187
- package/src/components/ui/alert.tsx +77 -77
- package/src/components/ui/avatar.tsx +108 -108
- package/src/components/ui/badge.tsx +55 -55
- package/src/components/ui/breadcrumb.tsx +125 -125
- package/src/components/ui/button-group.tsx +89 -89
- package/src/components/ui/button.tsx +59 -59
- package/src/components/ui/card.tsx +101 -101
- package/src/components/ui/checkbox.tsx +27 -27
- package/src/components/ui/collapsible.tsx +21 -21
- package/src/components/ui/context-menu.tsx +271 -271
- package/src/components/ui/dialog.tsx +161 -161
- package/src/components/ui/dropdown-menu.tsx +271 -271
- package/src/components/ui/empty.tsx +105 -105
- package/src/components/ui/field.tsx +238 -238
- package/src/components/ui/hover-card.tsx +50 -50
- package/src/components/ui/input-group.tsx +155 -155
- package/src/components/ui/input.tsx +21 -21
- package/src/components/ui/kbd.tsx +28 -28
- package/src/components/ui/label.tsx +19 -19
- package/src/components/ui/orb.css +1002 -1002
- package/src/components/ui/orb.tsx +752 -752
- package/src/components/ui/popover.tsx +89 -89
- package/src/components/ui/progress.tsx +82 -82
- package/src/components/ui/radio-group.tsx +37 -37
- package/src/components/ui/scroll-area.tsx +54 -54
- package/src/components/ui/select.tsx +204 -204
- package/src/components/ui/separator.tsx +24 -24
- package/src/components/ui/sheet.tsx +139 -139
- package/src/components/ui/sidebar.tsx +1039 -1035
- package/src/components/ui/skeleton.tsx +15 -15
- package/src/components/ui/slider.tsx +53 -53
- package/src/components/ui/sonner.tsx +44 -44
- package/src/components/ui/spinner.tsx +32 -32
- package/src/components/ui/switch.tsx +31 -31
- package/src/components/ui/table.tsx +121 -121
- package/src/components/ui/tabs.tsx +81 -81
- package/src/components/ui/textarea.tsx +19 -19
- package/src/components/ui/toggle-group.tsx +89 -89
- package/src/components/ui/toggle.tsx +44 -44
- package/src/components/ui/tooltip.tsx +65 -65
- package/src/hooks/use-mobile.ts +20 -20
- package/src/lib/i18n.tsx +109 -109
- package/src/lib/utils.ts +1 -1
- package/src/patterns/app-shell.tsx +177 -179
- package/src/patterns/data-table.tsx +2486 -2486
- package/src/patterns/details-sheet.tsx +54 -54
- package/src/patterns/filter-tabs.tsx +53 -53
- package/src/patterns/majapi-logo.tsx +32 -32
- package/src/patterns/page-header.tsx +62 -62
- package/src/patterns/preferences.tsx +15 -7
- package/src/patterns/status-badge.tsx +24 -24
- package/src/patterns/user-menu.tsx +218 -218
- package/src/patterns/workspace-switcher.tsx +176 -173
- package/src/styles.css +165 -165
- package/src/templates/admin-dashboard.tsx +44 -44
- package/src/templates/auth-layout.tsx +30 -30
- package/src/templates/login-form.tsx +129 -129
- package/src/templates/signup-form.tsx +177 -177
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
5
|
-
import { cn } from "cn";
|
|
6
|
-
|
|
7
|
-
function Popover({ ...props }: PopoverPrimitive.Root.Props) {
|
|
8
|
-
return <PopoverPrimitive.Root data-slot="popover" {...props} />;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
|
|
12
|
-
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function PopoverContent({
|
|
16
|
-
className,
|
|
17
|
-
align = "center",
|
|
18
|
-
alignOffset = 0,
|
|
19
|
-
side = "bottom",
|
|
20
|
-
sideOffset = 4,
|
|
21
|
-
...props
|
|
22
|
-
}: PopoverPrimitive.Popup.Props &
|
|
23
|
-
Pick<
|
|
24
|
-
PopoverPrimitive.Positioner.Props,
|
|
25
|
-
"align" | "alignOffset" | "side" | "sideOffset"
|
|
26
|
-
>) {
|
|
27
|
-
return (
|
|
28
|
-
<PopoverPrimitive.Portal>
|
|
29
|
-
<PopoverPrimitive.Positioner
|
|
30
|
-
align={align}
|
|
31
|
-
alignOffset={alignOffset}
|
|
32
|
-
side={side}
|
|
33
|
-
sideOffset={sideOffset}
|
|
34
|
-
className="isolate z-50"
|
|
35
|
-
>
|
|
36
|
-
<PopoverPrimitive.Popup
|
|
37
|
-
data-slot="popover-content"
|
|
38
|
-
className={cn(
|
|
39
|
-
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-3xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/5 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
40
|
-
className,
|
|
41
|
-
)}
|
|
42
|
-
{...props}
|
|
43
|
-
/>
|
|
44
|
-
</PopoverPrimitive.Positioner>
|
|
45
|
-
</PopoverPrimitive.Portal>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
50
|
-
return (
|
|
51
|
-
<div
|
|
52
|
-
data-slot="popover-header"
|
|
53
|
-
className={cn("flex flex-col gap-1 text-sm", className)}
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
|
|
60
|
-
return (
|
|
61
|
-
<PopoverPrimitive.Title
|
|
62
|
-
data-slot="popover-title"
|
|
63
|
-
className={cn("text-base font-medium", className)}
|
|
64
|
-
{...props}
|
|
65
|
-
/>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function PopoverDescription({
|
|
70
|
-
className,
|
|
71
|
-
...props
|
|
72
|
-
}: PopoverPrimitive.Description.Props) {
|
|
73
|
-
return (
|
|
74
|
-
<PopoverPrimitive.Description
|
|
75
|
-
data-slot="popover-description"
|
|
76
|
-
className={cn("text-muted-foreground", className)}
|
|
77
|
-
{...props}
|
|
78
|
-
/>
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export {
|
|
83
|
-
Popover,
|
|
84
|
-
PopoverContent,
|
|
85
|
-
PopoverDescription,
|
|
86
|
-
PopoverHeader,
|
|
87
|
-
PopoverTitle,
|
|
88
|
-
PopoverTrigger,
|
|
89
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
|
|
7
|
+
function Popover({ ...props }: PopoverPrimitive.Root.Props) {
|
|
8
|
+
return <PopoverPrimitive.Root data-slot="popover" {...props} />;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
|
|
12
|
+
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function PopoverContent({
|
|
16
|
+
className,
|
|
17
|
+
align = "center",
|
|
18
|
+
alignOffset = 0,
|
|
19
|
+
side = "bottom",
|
|
20
|
+
sideOffset = 4,
|
|
21
|
+
...props
|
|
22
|
+
}: PopoverPrimitive.Popup.Props &
|
|
23
|
+
Pick<
|
|
24
|
+
PopoverPrimitive.Positioner.Props,
|
|
25
|
+
"align" | "alignOffset" | "side" | "sideOffset"
|
|
26
|
+
>) {
|
|
27
|
+
return (
|
|
28
|
+
<PopoverPrimitive.Portal>
|
|
29
|
+
<PopoverPrimitive.Positioner
|
|
30
|
+
align={align}
|
|
31
|
+
alignOffset={alignOffset}
|
|
32
|
+
side={side}
|
|
33
|
+
sideOffset={sideOffset}
|
|
34
|
+
className="isolate z-50"
|
|
35
|
+
>
|
|
36
|
+
<PopoverPrimitive.Popup
|
|
37
|
+
data-slot="popover-content"
|
|
38
|
+
className={cn(
|
|
39
|
+
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-3xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/5 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
40
|
+
className,
|
|
41
|
+
)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
</PopoverPrimitive.Positioner>
|
|
45
|
+
</PopoverPrimitive.Portal>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
50
|
+
return (
|
|
51
|
+
<div
|
|
52
|
+
data-slot="popover-header"
|
|
53
|
+
className={cn("flex flex-col gap-1 text-sm", className)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
|
|
60
|
+
return (
|
|
61
|
+
<PopoverPrimitive.Title
|
|
62
|
+
data-slot="popover-title"
|
|
63
|
+
className={cn("text-base font-medium", className)}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function PopoverDescription({
|
|
70
|
+
className,
|
|
71
|
+
...props
|
|
72
|
+
}: PopoverPrimitive.Description.Props) {
|
|
73
|
+
return (
|
|
74
|
+
<PopoverPrimitive.Description
|
|
75
|
+
data-slot="popover-description"
|
|
76
|
+
className={cn("text-muted-foreground", className)}
|
|
77
|
+
{...props}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
Popover,
|
|
84
|
+
PopoverContent,
|
|
85
|
+
PopoverDescription,
|
|
86
|
+
PopoverHeader,
|
|
87
|
+
PopoverTitle,
|
|
88
|
+
PopoverTrigger,
|
|
89
|
+
};
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
4
|
-
import { cn } from "cn";
|
|
5
|
-
|
|
6
|
-
function Progress({
|
|
7
|
-
className,
|
|
8
|
-
children,
|
|
9
|
-
value,
|
|
10
|
-
...props
|
|
11
|
-
}: ProgressPrimitive.Root.Props) {
|
|
12
|
-
return (
|
|
13
|
-
<ProgressPrimitive.Root
|
|
14
|
-
value={value}
|
|
15
|
-
data-slot="progress"
|
|
16
|
-
className={cn("flex flex-wrap gap-3", className)}
|
|
17
|
-
{...props}
|
|
18
|
-
>
|
|
19
|
-
{children}
|
|
20
|
-
<ProgressTrack>
|
|
21
|
-
<ProgressIndicator />
|
|
22
|
-
</ProgressTrack>
|
|
23
|
-
</ProgressPrimitive.Root>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
28
|
-
return (
|
|
29
|
-
<ProgressPrimitive.Track
|
|
30
|
-
className={cn(
|
|
31
|
-
"relative flex h-3 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
32
|
-
className,
|
|
33
|
-
)}
|
|
34
|
-
data-slot="progress-track"
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function ProgressIndicator({
|
|
41
|
-
className,
|
|
42
|
-
...props
|
|
43
|
-
}: ProgressPrimitive.Indicator.Props) {
|
|
44
|
-
return (
|
|
45
|
-
<ProgressPrimitive.Indicator
|
|
46
|
-
data-slot="progress-indicator"
|
|
47
|
-
className={cn("h-full bg-primary transition-all", className)}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
54
|
-
return (
|
|
55
|
-
<ProgressPrimitive.Label
|
|
56
|
-
className={cn("text-sm font-medium", className)}
|
|
57
|
-
data-slot="progress-label"
|
|
58
|
-
{...props}
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
64
|
-
return (
|
|
65
|
-
<ProgressPrimitive.Value
|
|
66
|
-
className={cn(
|
|
67
|
-
"ml-auto text-sm text-muted-foreground tabular-nums",
|
|
68
|
-
className,
|
|
69
|
-
)}
|
|
70
|
-
data-slot="progress-value"
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export {
|
|
77
|
-
Progress,
|
|
78
|
-
ProgressTrack,
|
|
79
|
-
ProgressIndicator,
|
|
80
|
-
ProgressLabel,
|
|
81
|
-
ProgressValue,
|
|
82
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
4
|
+
import { cn } from "cn";
|
|
5
|
+
|
|
6
|
+
function Progress({
|
|
7
|
+
className,
|
|
8
|
+
children,
|
|
9
|
+
value,
|
|
10
|
+
...props
|
|
11
|
+
}: ProgressPrimitive.Root.Props) {
|
|
12
|
+
return (
|
|
13
|
+
<ProgressPrimitive.Root
|
|
14
|
+
value={value}
|
|
15
|
+
data-slot="progress"
|
|
16
|
+
className={cn("flex flex-wrap gap-3", className)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
<ProgressTrack>
|
|
21
|
+
<ProgressIndicator />
|
|
22
|
+
</ProgressTrack>
|
|
23
|
+
</ProgressPrimitive.Root>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
28
|
+
return (
|
|
29
|
+
<ProgressPrimitive.Track
|
|
30
|
+
className={cn(
|
|
31
|
+
"relative flex h-3 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
32
|
+
className,
|
|
33
|
+
)}
|
|
34
|
+
data-slot="progress-track"
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function ProgressIndicator({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: ProgressPrimitive.Indicator.Props) {
|
|
44
|
+
return (
|
|
45
|
+
<ProgressPrimitive.Indicator
|
|
46
|
+
data-slot="progress-indicator"
|
|
47
|
+
className={cn("h-full bg-primary transition-all", className)}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
54
|
+
return (
|
|
55
|
+
<ProgressPrimitive.Label
|
|
56
|
+
className={cn("text-sm font-medium", className)}
|
|
57
|
+
data-slot="progress-label"
|
|
58
|
+
{...props}
|
|
59
|
+
/>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
64
|
+
return (
|
|
65
|
+
<ProgressPrimitive.Value
|
|
66
|
+
className={cn(
|
|
67
|
+
"ml-auto text-sm text-muted-foreground tabular-nums",
|
|
68
|
+
className,
|
|
69
|
+
)}
|
|
70
|
+
data-slot="progress-value"
|
|
71
|
+
{...props}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
Progress,
|
|
78
|
+
ProgressTrack,
|
|
79
|
+
ProgressIndicator,
|
|
80
|
+
ProgressLabel,
|
|
81
|
+
ProgressValue,
|
|
82
|
+
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
4
|
-
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
5
|
-
import { cn } from "cn";
|
|
6
|
-
|
|
7
|
-
function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
8
|
-
return (
|
|
9
|
-
<RadioGroupPrimitive
|
|
10
|
-
data-slot="radio-group"
|
|
11
|
-
className={cn("grid w-full gap-3", className)}
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
18
|
-
return (
|
|
19
|
-
<RadioPrimitive.Root
|
|
20
|
-
data-slot="radio-group-item"
|
|
21
|
-
className={cn(
|
|
22
|
-
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-transparent bg-input/90 outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
23
|
-
className,
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
>
|
|
27
|
-
<RadioPrimitive.Indicator
|
|
28
|
-
data-slot="radio-group-indicator"
|
|
29
|
-
className="flex size-4 items-center justify-center"
|
|
30
|
-
>
|
|
31
|
-
<span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground dark:size-2.5" />
|
|
32
|
-
</RadioPrimitive.Indicator>
|
|
33
|
-
</RadioPrimitive.Root>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export { RadioGroup, RadioGroupItem };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
4
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
|
|
7
|
+
function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
8
|
+
return (
|
|
9
|
+
<RadioGroupPrimitive
|
|
10
|
+
data-slot="radio-group"
|
|
11
|
+
className={cn("grid w-full gap-3", className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
18
|
+
return (
|
|
19
|
+
<RadioPrimitive.Root
|
|
20
|
+
data-slot="radio-group-item"
|
|
21
|
+
className={cn(
|
|
22
|
+
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-transparent bg-input/90 outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
>
|
|
27
|
+
<RadioPrimitive.Indicator
|
|
28
|
+
data-slot="radio-group-indicator"
|
|
29
|
+
className="flex size-4 items-center justify-center"
|
|
30
|
+
>
|
|
31
|
+
<span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground dark:size-2.5" />
|
|
32
|
+
</RadioPrimitive.Indicator>
|
|
33
|
+
</RadioPrimitive.Root>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
5
|
-
import { cn } from "cn";
|
|
6
|
-
|
|
7
|
-
function ScrollArea({
|
|
8
|
-
className,
|
|
9
|
-
children,
|
|
10
|
-
...props
|
|
11
|
-
}: ScrollAreaPrimitive.Root.Props) {
|
|
12
|
-
return (
|
|
13
|
-
<ScrollAreaPrimitive.Root
|
|
14
|
-
data-slot="scroll-area"
|
|
15
|
-
className={cn("relative", className)}
|
|
16
|
-
{...props}
|
|
17
|
-
>
|
|
18
|
-
<ScrollAreaPrimitive.Viewport
|
|
19
|
-
data-slot="scroll-area-viewport"
|
|
20
|
-
className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
|
|
21
|
-
>
|
|
22
|
-
{children}
|
|
23
|
-
</ScrollAreaPrimitive.Viewport>
|
|
24
|
-
<ScrollBar />
|
|
25
|
-
<ScrollAreaPrimitive.Corner />
|
|
26
|
-
</ScrollAreaPrimitive.Root>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function ScrollBar({
|
|
31
|
-
className,
|
|
32
|
-
orientation = "vertical",
|
|
33
|
-
...props
|
|
34
|
-
}: ScrollAreaPrimitive.Scrollbar.Props) {
|
|
35
|
-
return (
|
|
36
|
-
<ScrollAreaPrimitive.Scrollbar
|
|
37
|
-
data-slot="scroll-area-scrollbar"
|
|
38
|
-
data-orientation={orientation}
|
|
39
|
-
orientation={orientation}
|
|
40
|
-
className={cn(
|
|
41
|
-
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
|
|
42
|
-
className,
|
|
43
|
-
)}
|
|
44
|
-
{...props}
|
|
45
|
-
>
|
|
46
|
-
<ScrollAreaPrimitive.Thumb
|
|
47
|
-
data-slot="scroll-area-thumb"
|
|
48
|
-
className="relative flex-1 rounded-full bg-border"
|
|
49
|
-
/>
|
|
50
|
-
</ScrollAreaPrimitive.Scrollbar>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { ScrollArea, ScrollBar };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
|
|
7
|
+
function ScrollArea({
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}: ScrollAreaPrimitive.Root.Props) {
|
|
12
|
+
return (
|
|
13
|
+
<ScrollAreaPrimitive.Root
|
|
14
|
+
data-slot="scroll-area"
|
|
15
|
+
className={cn("relative", className)}
|
|
16
|
+
{...props}
|
|
17
|
+
>
|
|
18
|
+
<ScrollAreaPrimitive.Viewport
|
|
19
|
+
data-slot="scroll-area-viewport"
|
|
20
|
+
className="size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1"
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
</ScrollAreaPrimitive.Viewport>
|
|
24
|
+
<ScrollBar />
|
|
25
|
+
<ScrollAreaPrimitive.Corner />
|
|
26
|
+
</ScrollAreaPrimitive.Root>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function ScrollBar({
|
|
31
|
+
className,
|
|
32
|
+
orientation = "vertical",
|
|
33
|
+
...props
|
|
34
|
+
}: ScrollAreaPrimitive.Scrollbar.Props) {
|
|
35
|
+
return (
|
|
36
|
+
<ScrollAreaPrimitive.Scrollbar
|
|
37
|
+
data-slot="scroll-area-scrollbar"
|
|
38
|
+
data-orientation={orientation}
|
|
39
|
+
orientation={orientation}
|
|
40
|
+
className={cn(
|
|
41
|
+
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
{...props}
|
|
45
|
+
>
|
|
46
|
+
<ScrollAreaPrimitive.Thumb
|
|
47
|
+
data-slot="scroll-area-thumb"
|
|
48
|
+
className="relative flex-1 rounded-full bg-border"
|
|
49
|
+
/>
|
|
50
|
+
</ScrollAreaPrimitive.Scrollbar>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { ScrollArea, ScrollBar };
|