@arch-cadre/ui 0.0.61 → 0.0.63
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/.gitkeep +0 -0
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.mjs +58 -0
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.mjs +144 -0
- package/dist/components/alert.d.ts +4 -4
- package/dist/components/alert.mjs +62 -0
- package/dist/components/aspect-ratio.d.ts +1 -1
- package/dist/components/aspect-ratio.mjs +9 -0
- package/dist/components/avatar.d.ts +3 -3
- package/dist/components/avatar.mjs +50 -0
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.mjs +37 -0
- package/dist/components/breadcrumb.d.ts +7 -7
- package/dist/components/breadcrumb.mjs +105 -0
- package/dist/components/button-group.d.ts +4 -4
- package/dist/components/button-group.mjs +76 -0
- package/dist/components/button.d.ts +3 -3
- package/dist/components/button.mjs +51 -0
- package/dist/components/calendar.d.ts +2 -2
- package/dist/components/calendar.mjs +191 -0
- package/dist/components/card.d.ts +7 -7
- package/dist/components/card.mjs +90 -0
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.mjs +30 -0
- package/dist/components/collapsible.d.ts +3 -3
- package/dist/components/collapsible.mjs +31 -0
- package/dist/components/command.d.ts +9 -9
- package/dist/components/command.mjs +169 -0
- package/dist/components/context-menu.d.ts +15 -15
- package/dist/components/context-menu.mjs +218 -0
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.mjs +130 -0
- package/dist/components/drawer.d.ts +10 -10
- package/dist/components/drawer.mjs +124 -0
- package/dist/components/dropdown-menu.d.ts +15 -15
- package/dist/components/dropdown-menu.mjs +226 -0
- package/dist/components/empty.d.ts +7 -7
- package/dist/components/empty.mjs +102 -0
- package/dist/components/field.d.ts +11 -11
- package/dist/components/field.mjs +228 -0
- package/dist/components/form.d.ts +6 -6
- package/dist/components/form.mjs +123 -0
- package/dist/components/hover-card.d.ts +3 -3
- package/dist/components/hover-card.mjs +35 -0
- package/dist/components/input-group.d.ts +8 -8
- package/dist/components/input-group.mjs +155 -0
- package/dist/components/input-otp.d.ts +4 -4
- package/dist/components/input-otp.mjs +59 -0
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.mjs +19 -0
- package/dist/components/item.d.ts +13 -13
- package/dist/components/item.mjs +187 -0
- package/dist/components/kbd.d.ts +2 -2
- package/dist/components/kbd.mjs +28 -0
- package/dist/components/label.d.ts +1 -1
- package/dist/components/label.mjs +21 -0
- package/dist/components/language-switcher.d.ts +2 -1
- package/dist/components/language-switcher.mjs +30 -0
- package/dist/components/menubar.d.ts +16 -16
- package/dist/components/menubar.mjs +246 -0
- package/dist/components/navigation-menu.d.ts +9 -9
- package/dist/components/navigation-menu.mjs +166 -0
- package/dist/components/pagination.d.ts +7 -7
- package/dist/components/pagination.mjs +116 -0
- package/dist/components/popover.d.ts +4 -4
- package/dist/components/popover.mjs +40 -0
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/progress.mjs +30 -0
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.mjs +43 -0
- package/dist/components/scroll-area.d.ts +2 -2
- package/dist/components/scroll-area.mjs +59 -0
- package/dist/components/select.d.ts +10 -10
- package/dist/components/select.mjs +173 -0
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.mjs +25 -0
- package/dist/components/sheet.d.ts +8 -8
- package/dist/components/sheet.mjs +119 -0
- package/dist/components/sidebar.d.ts +24 -24
- package/dist/components/sidebar.mjs +635 -0
- package/dist/components/skeleton.d.ts +1 -1
- package/dist/components/skeleton.mjs +13 -0
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.mjs +59 -0
- package/dist/components/sonner.d.ts +2 -1
- package/dist/components/sonner.mjs +36 -0
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.mjs +15 -0
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.mjs +30 -0
- package/dist/components/table.d.ts +8 -8
- package/dist/components/table.mjs +115 -0
- package/dist/components/tabs.d.ts +4 -4
- package/dist/components/tabs.mjs +63 -0
- package/dist/components/textarea.d.ts +1 -1
- package/dist/components/textarea.mjs +16 -0
- package/dist/components/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group.mjs +65 -0
- package/dist/components/toggle.d.ts +2 -2
- package/dist/components/toggle.mjs +41 -0
- package/dist/components/tooltip.d.ts +4 -4
- package/dist/components/tooltip.mjs +49 -0
- package/dist/hooks/.gitkeep +0 -0
- package/dist/hooks/use-mobile.mjs +17 -0
- package/dist/hooks/use-user.mjs +12 -0
- package/dist/index.mjs +15 -0
- package/dist/lib/{utils.js → utils.mjs} +1 -1
- package/dist/logo.d.ts +2 -2
- package/dist/logo.mjs +32 -0
- package/dist/postcss.config.mjs +2 -1
- package/dist/providers/auth-provider.d.ts +1 -1
- package/dist/providers/auth-provider.mjs +37 -0
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.mjs +33 -0
- package/dist/shared/access-denied.d.ts +2 -1
- package/dist/shared/access-denied.mjs +12 -0
- package/dist/shared/loader.d.ts +4 -4
- package/dist/shared/loader.mjs +98 -0
- package/dist/shared/page-loader.d.ts +2 -1
- package/dist/shared/page-loader.mjs +6 -0
- package/dist/shared/scroll-fade-effect.d.ts +1 -1
- package/dist/shared/scroll-fade-effect.mjs +20 -0
- package/dist/styles/globals.css +1 -0
- package/package.json +13 -13
- package/dist/components/accordion.js +0 -18
- package/dist/components/alert-dialog.js +0 -39
- package/dist/components/alert.js +0 -24
- package/dist/components/aspect-ratio.js +0 -7
- package/dist/components/avatar.js +0 -14
- package/dist/components/badge.js +0 -22
- package/dist/components/breadcrumb.js +0 -30
- package/dist/components/button-group.js +0 -28
- package/dist/components/button.js +0 -33
- package/dist/components/calendar.js +0 -76
- package/dist/components/card.js +0 -24
- package/dist/components/checkbox.js +0 -9
- package/dist/components/collapsible.js +0 -13
- package/dist/components/command.js +0 -34
- package/dist/components/context-menu.js +0 -51
- package/dist/components/dialog.js +0 -36
- package/dist/components/drawer.js +0 -35
- package/dist/components/dropdown-menu.js +0 -51
- package/dist/components/empty.js +0 -33
- package/dist/components/field.js +0 -78
- package/dist/components/form.js +0 -59
- package/dist/components/hover-card.js +0 -14
- package/dist/components/input-group.js +0 -63
- package/dist/components/input-otp.js +0 -21
- package/dist/components/input.js +0 -6
- package/dist/components/item.js +0 -66
- package/dist/components/kbd.js +0 -9
- package/dist/components/label.js +0 -8
- package/dist/components/language-switcher.js +0 -20
- package/dist/components/menubar.js +0 -54
- package/dist/components/navigation-menu.js +0 -31
- package/dist/components/pagination.js +0 -31
- package/dist/components/popover.js +0 -17
- package/dist/components/progress.js +0 -8
- package/dist/components/radio-group.js +0 -12
- package/dist/components/scroll-area.js +0 -13
- package/dist/components/select.js +0 -38
- package/dist/components/separator.js +0 -8
- package/dist/components/sheet.js +0 -40
- package/dist/components/sidebar.js +0 -213
- package/dist/components/skeleton.js +0 -6
- package/dist/components/slider.js +0 -14
- package/dist/components/sonner.js +0 -21
- package/dist/components/spinner.js +0 -7
- package/dist/components/switch.js +0 -8
- package/dist/components/table.js +0 -28
- package/dist/components/tabs.js +0 -17
- package/dist/components/textarea.js +0 -6
- package/dist/components/toggle-group.js +0 -22
- package/dist/components/toggle.js +0 -26
- package/dist/components/tooltip.js +0 -17
- package/dist/hooks/use-mobile.js +0 -15
- package/dist/hooks/use-user.js +0 -25
- package/dist/index.js +0 -15
- package/dist/logo.js +0 -28
- package/dist/providers/auth-provider.js +0 -27
- package/dist/providers/index.js +0 -23
- package/dist/shared/access-denied.js +0 -6
- package/dist/shared/loader.js +0 -41
- package/dist/shared/page-loader.js +0 -6
- package/dist/shared/scroll-fade-effect.js +0 -5
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/utils.mjs";
|
|
5
|
+
import { Separator } from "./separator.mjs";
|
|
6
|
+
const buttonGroupVariants = cva(
|
|
7
|
+
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
12
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
orientation: "horizontal"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
function ButtonGroup({
|
|
21
|
+
className,
|
|
22
|
+
orientation,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ React.createElement(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
role: "group",
|
|
29
|
+
"data-slot": "button-group",
|
|
30
|
+
"data-orientation": orientation,
|
|
31
|
+
className: cn(buttonGroupVariants({ orientation }), className),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function ButtonGroupText({
|
|
37
|
+
className,
|
|
38
|
+
asChild = false,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
const Comp = asChild ? SlotPrimitive.Slot : "div";
|
|
42
|
+
return /* @__PURE__ */ React.createElement(
|
|
43
|
+
Comp,
|
|
44
|
+
{
|
|
45
|
+
className: cn(
|
|
46
|
+
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function ButtonGroupSeparator({
|
|
54
|
+
className,
|
|
55
|
+
orientation = "vertical",
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ React.createElement(
|
|
59
|
+
Separator,
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "button-group-separator",
|
|
62
|
+
orientation,
|
|
63
|
+
className: cn(
|
|
64
|
+
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
65
|
+
className
|
|
66
|
+
),
|
|
67
|
+
...props
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
ButtonGroup,
|
|
73
|
+
ButtonGroupSeparator,
|
|
74
|
+
ButtonGroupText,
|
|
75
|
+
buttonGroupVariants
|
|
76
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): React.JSX.Element;
|
|
10
10
|
export { Button, buttonVariants };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/utils.mjs";
|
|
5
|
+
const buttonVariants = cva(
|
|
6
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
11
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
12
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
13
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
14
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
15
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
19
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
20
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
21
|
+
icon: "size-9",
|
|
22
|
+
"icon-sm": "size-8",
|
|
23
|
+
"icon-lg": "size-10"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
function Button({
|
|
33
|
+
className,
|
|
34
|
+
variant = "default",
|
|
35
|
+
size = "default",
|
|
36
|
+
asChild = false,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
39
|
+
const Comp = asChild ? SlotPrimitive.Slot : "button";
|
|
40
|
+
return /* @__PURE__ */ React.createElement(
|
|
41
|
+
Comp,
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "button",
|
|
44
|
+
"data-variant": variant,
|
|
45
|
+
"data-size": size,
|
|
46
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
export { Button, buttonVariants };
|
|
@@ -3,6 +3,6 @@ import { type DayButton, DayPicker } from "react-day-picker";
|
|
|
3
3
|
import { Button } from "./button";
|
|
4
4
|
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
5
|
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
6
|
-
}):
|
|
7
|
-
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>):
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
|
|
8
8
|
export { Calendar, CalendarDayButton };
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
ChevronDownIcon,
|
|
4
|
+
ChevronLeftIcon,
|
|
5
|
+
ChevronRightIcon
|
|
6
|
+
} from "lucide-react";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import {
|
|
9
|
+
DayPicker,
|
|
10
|
+
getDefaultClassNames
|
|
11
|
+
} from "react-day-picker";
|
|
12
|
+
import { cn } from "../lib/utils.mjs";
|
|
13
|
+
import { Button, buttonVariants } from "./button.mjs";
|
|
14
|
+
function Calendar({
|
|
15
|
+
className,
|
|
16
|
+
classNames,
|
|
17
|
+
showOutsideDays = true,
|
|
18
|
+
captionLayout = "label",
|
|
19
|
+
buttonVariant = "ghost",
|
|
20
|
+
formatters,
|
|
21
|
+
components,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
const defaultClassNames = getDefaultClassNames();
|
|
25
|
+
return /* @__PURE__ */ React.createElement(
|
|
26
|
+
DayPicker,
|
|
27
|
+
{
|
|
28
|
+
showOutsideDays,
|
|
29
|
+
className: cn(
|
|
30
|
+
"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
31
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
32
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
33
|
+
className
|
|
34
|
+
),
|
|
35
|
+
captionLayout,
|
|
36
|
+
formatters: {
|
|
37
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
38
|
+
...formatters
|
|
39
|
+
},
|
|
40
|
+
classNames: {
|
|
41
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
42
|
+
months: cn(
|
|
43
|
+
"flex gap-4 flex-col md:flex-row relative",
|
|
44
|
+
defaultClassNames.months
|
|
45
|
+
),
|
|
46
|
+
month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
|
|
47
|
+
nav: cn(
|
|
48
|
+
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
49
|
+
defaultClassNames.nav
|
|
50
|
+
),
|
|
51
|
+
button_previous: cn(
|
|
52
|
+
buttonVariants({ variant: buttonVariant }),
|
|
53
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
54
|
+
defaultClassNames.button_previous
|
|
55
|
+
),
|
|
56
|
+
button_next: cn(
|
|
57
|
+
buttonVariants({ variant: buttonVariant }),
|
|
58
|
+
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
59
|
+
defaultClassNames.button_next
|
|
60
|
+
),
|
|
61
|
+
month_caption: cn(
|
|
62
|
+
"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
|
|
63
|
+
defaultClassNames.month_caption
|
|
64
|
+
),
|
|
65
|
+
dropdowns: cn(
|
|
66
|
+
"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
67
|
+
defaultClassNames.dropdowns
|
|
68
|
+
),
|
|
69
|
+
dropdown_root: cn(
|
|
70
|
+
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
71
|
+
defaultClassNames.dropdown_root
|
|
72
|
+
),
|
|
73
|
+
dropdown: cn(
|
|
74
|
+
"absolute bg-popover inset-0 opacity-0",
|
|
75
|
+
defaultClassNames.dropdown
|
|
76
|
+
),
|
|
77
|
+
caption_label: cn(
|
|
78
|
+
"select-none font-medium",
|
|
79
|
+
captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
80
|
+
defaultClassNames.caption_label
|
|
81
|
+
),
|
|
82
|
+
table: "w-full border-collapse",
|
|
83
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
84
|
+
weekday: cn(
|
|
85
|
+
"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
|
|
86
|
+
defaultClassNames.weekday
|
|
87
|
+
),
|
|
88
|
+
week: cn("flex w-full mt-2", defaultClassNames.week),
|
|
89
|
+
week_number_header: cn(
|
|
90
|
+
"select-none w-(--cell-size)",
|
|
91
|
+
defaultClassNames.week_number_header
|
|
92
|
+
),
|
|
93
|
+
week_number: cn(
|
|
94
|
+
"text-[0.8rem] select-none text-muted-foreground",
|
|
95
|
+
defaultClassNames.week_number
|
|
96
|
+
),
|
|
97
|
+
day: cn(
|
|
98
|
+
"relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
|
|
99
|
+
props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
100
|
+
defaultClassNames.day
|
|
101
|
+
),
|
|
102
|
+
range_start: cn(
|
|
103
|
+
"rounded-l-md bg-accent",
|
|
104
|
+
defaultClassNames.range_start
|
|
105
|
+
),
|
|
106
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
107
|
+
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
108
|
+
today: cn(
|
|
109
|
+
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
110
|
+
defaultClassNames.today
|
|
111
|
+
),
|
|
112
|
+
outside: cn(
|
|
113
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
114
|
+
defaultClassNames.outside
|
|
115
|
+
),
|
|
116
|
+
disabled: cn(
|
|
117
|
+
"text-muted-foreground opacity-50",
|
|
118
|
+
defaultClassNames.disabled
|
|
119
|
+
),
|
|
120
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
121
|
+
...classNames
|
|
122
|
+
},
|
|
123
|
+
components: {
|
|
124
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
125
|
+
return /* @__PURE__ */ React.createElement(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
"data-slot": "calendar",
|
|
129
|
+
ref: rootRef,
|
|
130
|
+
className: cn(className2),
|
|
131
|
+
...props2
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
},
|
|
135
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
136
|
+
if (orientation === "left") {
|
|
137
|
+
return /* @__PURE__ */ React.createElement(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
138
|
+
}
|
|
139
|
+
if (orientation === "right") {
|
|
140
|
+
return /* @__PURE__ */ React.createElement(
|
|
141
|
+
ChevronRightIcon,
|
|
142
|
+
{
|
|
143
|
+
className: cn("size-4", className2),
|
|
144
|
+
...props2
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
return /* @__PURE__ */ React.createElement(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
149
|
+
},
|
|
150
|
+
DayButton: CalendarDayButton,
|
|
151
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
152
|
+
return /* @__PURE__ */ React.createElement("td", { ...props2 }, /* @__PURE__ */ React.createElement("div", { className: "flex size-(--cell-size) items-center justify-center text-center" }, children));
|
|
153
|
+
},
|
|
154
|
+
...components
|
|
155
|
+
},
|
|
156
|
+
...props
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
function CalendarDayButton({
|
|
161
|
+
className,
|
|
162
|
+
day,
|
|
163
|
+
modifiers,
|
|
164
|
+
...props
|
|
165
|
+
}) {
|
|
166
|
+
const defaultClassNames = getDefaultClassNames();
|
|
167
|
+
const ref = React.useRef(null);
|
|
168
|
+
React.useEffect(() => {
|
|
169
|
+
if (modifiers.focused) ref.current?.focus();
|
|
170
|
+
}, [modifiers.focused]);
|
|
171
|
+
return /* @__PURE__ */ React.createElement(
|
|
172
|
+
Button,
|
|
173
|
+
{
|
|
174
|
+
ref,
|
|
175
|
+
variant: "ghost",
|
|
176
|
+
size: "icon",
|
|
177
|
+
"data-day": day.date.toLocaleDateString(),
|
|
178
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
179
|
+
"data-range-start": modifiers.range_start,
|
|
180
|
+
"data-range-end": modifiers.range_end,
|
|
181
|
+
"data-range-middle": modifiers.range_middle,
|
|
182
|
+
className: cn(
|
|
183
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
184
|
+
defaultClassNames.day,
|
|
185
|
+
className
|
|
186
|
+
),
|
|
187
|
+
...props
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
export { Calendar, CalendarDayButton };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare function Card({ className, ...props }: React.ComponentProps<"div">):
|
|
3
|
-
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">):
|
|
4
|
-
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">):
|
|
5
|
-
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">):
|
|
6
|
-
declare function CardAction({ className, ...props }: React.ComponentProps<"div">):
|
|
7
|
-
declare function CardContent({ className, ...props }: React.ComponentProps<"div">):
|
|
8
|
-
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">):
|
|
2
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
4
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
5
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
9
|
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
function Card({ className, ...props }) {
|
|
4
|
+
return /* @__PURE__ */ React.createElement(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "card",
|
|
8
|
+
className: cn(
|
|
9
|
+
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
10
|
+
className
|
|
11
|
+
),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function CardHeader({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ React.createElement(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "card-header",
|
|
21
|
+
className: cn(
|
|
22
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
23
|
+
className
|
|
24
|
+
),
|
|
25
|
+
...props
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function CardTitle({ className, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ React.createElement(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "card-title",
|
|
34
|
+
className: cn("leading-none font-semibold", className),
|
|
35
|
+
...props
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
function CardDescription({ className, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ React.createElement(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "card-description",
|
|
44
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
45
|
+
...props
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
function CardAction({ className, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ React.createElement(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
"data-slot": "card-action",
|
|
54
|
+
className: cn(
|
|
55
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
56
|
+
className
|
|
57
|
+
),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
function CardContent({ className, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ React.createElement(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
"data-slot": "card-content",
|
|
67
|
+
className: cn("px-6", className),
|
|
68
|
+
...props
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
function CardFooter({ className, ...props }) {
|
|
73
|
+
return /* @__PURE__ */ React.createElement(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
"data-slot": "card-footer",
|
|
77
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
Card,
|
|
84
|
+
CardHeader,
|
|
85
|
+
CardFooter,
|
|
86
|
+
CardTitle,
|
|
87
|
+
CardAction,
|
|
88
|
+
CardDescription,
|
|
89
|
+
CardContent
|
|
90
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>):
|
|
3
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
export { Checkbox };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CheckIcon } from "lucide-react";
|
|
3
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "../lib/utils.mjs";
|
|
6
|
+
function Checkbox({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ React.createElement(
|
|
11
|
+
CheckboxPrimitive.Root,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "checkbox",
|
|
14
|
+
className: cn(
|
|
15
|
+
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
},
|
|
20
|
+
/* @__PURE__ */ React.createElement(
|
|
21
|
+
CheckboxPrimitive.Indicator,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "checkbox-indicator",
|
|
24
|
+
className: "grid place-content-center text-current transition-none"
|
|
25
|
+
},
|
|
26
|
+
/* @__PURE__ */ React.createElement(CheckIcon, { className: "size-3.5" })
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
export { Checkbox };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>):
|
|
4
|
-
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>):
|
|
5
|
-
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>):
|
|
3
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): React.JSX.Element;
|
|
5
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): React.JSX.Element;
|
|
6
6
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
function Collapsible({
|
|
5
|
+
...props
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ React.createElement(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
8
|
+
}
|
|
9
|
+
function CollapsibleTrigger({
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ React.createElement(
|
|
13
|
+
CollapsiblePrimitive.CollapsibleTrigger,
|
|
14
|
+
{
|
|
15
|
+
"data-slot": "collapsible-trigger",
|
|
16
|
+
...props
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
function CollapsibleContent({
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ React.createElement(
|
|
24
|
+
CollapsiblePrimitive.CollapsibleContent,
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "collapsible-content",
|
|
27
|
+
...props
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Command as CommandPrimitive } from "cmdk";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Dialog } from "./dialog";
|
|
4
|
-
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>):
|
|
4
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
|
|
5
5
|
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
6
6
|
title?: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
showCloseButton?: boolean;
|
|
10
|
-
}):
|
|
11
|
-
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>):
|
|
12
|
-
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>):
|
|
13
|
-
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>):
|
|
14
|
-
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>):
|
|
15
|
-
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>):
|
|
16
|
-
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>):
|
|
17
|
-
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">):
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
|
|
12
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
|
|
13
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
|
|
14
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
|
|
15
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
|
|
16
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
|
|
17
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
18
18
|
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|