react-shadcn-kit 0.0.1

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.
Files changed (123) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +113 -0
  3. package/dist/assets/global.css +1 -0
  4. package/dist/atoms/accordion.d.ts +7 -0
  5. package/dist/atoms/accordion.js +62 -0
  6. package/dist/atoms/alert-dialog.d.ts +14 -0
  7. package/dist/atoms/alert-dialog.js +127 -0
  8. package/dist/atoms/alert.d.ts +9 -0
  9. package/dist/atoms/alert.js +60 -0
  10. package/dist/atoms/aspect-ratio.d.ts +3 -0
  11. package/dist/atoms/aspect-ratio.js +8 -0
  12. package/dist/atoms/avatar.d.ts +6 -0
  13. package/dist/atoms/avatar.js +41 -0
  14. package/dist/atoms/badge.d.ts +9 -0
  15. package/dist/atoms/badge.js +32 -0
  16. package/dist/atoms/breadcrumb.d.ts +11 -0
  17. package/dist/atoms/breadcrumb.js +95 -0
  18. package/dist/atoms/button-group.d.ts +11 -0
  19. package/dist/atoms/button-group.js +75 -0
  20. package/dist/atoms/button.d.ts +10 -0
  21. package/dist/atoms/button.js +51 -0
  22. package/dist/atoms/calendar.d.ts +8 -0
  23. package/dist/atoms/calendar.js +144 -0
  24. package/dist/atoms/card.d.ts +9 -0
  25. package/dist/atoms/card.js +80 -0
  26. package/dist/atoms/carousel.d.ts +19 -0
  27. package/dist/atoms/carousel.js +165 -0
  28. package/dist/atoms/chart.d.ts +43 -0
  29. package/dist/atoms/chart.js +203 -0
  30. package/dist/atoms/checkbox.d.ts +4 -0
  31. package/dist/atoms/checkbox.js +28 -0
  32. package/dist/atoms/collapsible.d.ts +5 -0
  33. package/dist/atoms/collapsible.js +20 -0
  34. package/dist/atoms/command.d.ts +18 -0
  35. package/dist/atoms/command.js +143 -0
  36. package/dist/atoms/context-menu.d.ts +25 -0
  37. package/dist/atoms/context-menu.js +200 -0
  38. package/dist/atoms/dialog.d.ts +15 -0
  39. package/dist/atoms/dialog.js +122 -0
  40. package/dist/atoms/drawer.d.ts +13 -0
  41. package/dist/atoms/drawer.js +117 -0
  42. package/dist/atoms/dropdown-menu.d.ts +25 -0
  43. package/dist/atoms/dropdown-menu.js +204 -0
  44. package/dist/atoms/empty.d.ts +11 -0
  45. package/dist/atoms/empty.js +99 -0
  46. package/dist/atoms/field.d.ts +24 -0
  47. package/dist/atoms/field.js +208 -0
  48. package/dist/atoms/form.d.ts +24 -0
  49. package/dist/atoms/form.js +87 -0
  50. package/dist/atoms/hover-card.d.ts +6 -0
  51. package/dist/atoms/hover-card.js +34 -0
  52. package/dist/atoms/input-group.d.ts +16 -0
  53. package/dist/atoms/input-group.js +142 -0
  54. package/dist/atoms/input-otp.d.ts +11 -0
  55. package/dist/atoms/input-otp.js +55 -0
  56. package/dist/atoms/input.d.ts +3 -0
  57. package/dist/atoms/input.js +21 -0
  58. package/dist/atoms/item.d.ts +23 -0
  59. package/dist/atoms/item.js +164 -0
  60. package/dist/atoms/kbd.d.ts +3 -0
  61. package/dist/atoms/kbd.js +31 -0
  62. package/dist/atoms/label.d.ts +4 -0
  63. package/dist/atoms/label.js +19 -0
  64. package/dist/atoms/menubar.d.ts +26 -0
  65. package/dist/atoms/menubar.js +229 -0
  66. package/dist/atoms/navigation-menu.d.ts +14 -0
  67. package/dist/atoms/navigation-menu.js +159 -0
  68. package/dist/atoms/pagination.d.ts +13 -0
  69. package/dist/atoms/pagination.js +100 -0
  70. package/dist/atoms/popover.d.ts +7 -0
  71. package/dist/atoms/popover.js +38 -0
  72. package/dist/atoms/progress.d.ts +4 -0
  73. package/dist/atoms/progress.js +28 -0
  74. package/dist/atoms/radio-group.d.ts +5 -0
  75. package/dist/atoms/radio-group.js +45 -0
  76. package/dist/atoms/resizable.d.ts +8 -0
  77. package/dist/atoms/resizable.js +43 -0
  78. package/dist/atoms/scroll-area.d.ts +5 -0
  79. package/dist/atoms/scroll-area.js +60 -0
  80. package/dist/atoms/select.d.ts +15 -0
  81. package/dist/atoms/select.js +156 -0
  82. package/dist/atoms/separator.d.ts +4 -0
  83. package/dist/atoms/separator.js +26 -0
  84. package/dist/atoms/sheet.d.ts +13 -0
  85. package/dist/atoms/sheet.js +117 -0
  86. package/dist/atoms/sidebar.d.ts +69 -0
  87. package/dist/atoms/sidebar.js +570 -0
  88. package/dist/atoms/skeleton.d.ts +2 -0
  89. package/dist/atoms/skeleton.js +15 -0
  90. package/dist/atoms/slider.d.ts +4 -0
  91. package/dist/atoms/slider.js +63 -0
  92. package/dist/atoms/sonner.d.ts +3 -0
  93. package/dist/atoms/sonner.js +31 -0
  94. package/dist/atoms/spinner.d.ts +2 -0
  95. package/dist/atoms/spinner.js +17 -0
  96. package/dist/atoms/switch.d.ts +4 -0
  97. package/dist/atoms/switch.js +28 -0
  98. package/dist/atoms/table.d.ts +10 -0
  99. package/dist/atoms/table.js +94 -0
  100. package/dist/atoms/tabs.d.ts +7 -0
  101. package/dist/atoms/tabs.js +55 -0
  102. package/dist/atoms/textarea.d.ts +3 -0
  103. package/dist/atoms/textarea.js +18 -0
  104. package/dist/atoms/toggle-group.d.ts +9 -0
  105. package/dist/atoms/toggle-group.js +68 -0
  106. package/dist/atoms/toggle.d.ts +9 -0
  107. package/dist/atoms/toggle.js +43 -0
  108. package/dist/atoms/tooltip.d.ts +7 -0
  109. package/dist/atoms/tooltip.js +51 -0
  110. package/dist/config/default-navigation.js +136 -0
  111. package/dist/hooks/use-mobile.d.ts +1 -0
  112. package/dist/hooks/use-mobile.js +14 -0
  113. package/dist/index.d.ts +57 -0
  114. package/dist/index.js +347 -0
  115. package/dist/lib/utils.d.ts +2 -0
  116. package/dist/lib/utils.js +8 -0
  117. package/dist/molecules/app-navbar.d.ts +11 -0
  118. package/dist/molecules/app-navbar.js +117 -0
  119. package/dist/molecules/app-sidebar.d.ts +9 -0
  120. package/dist/molecules/app-sidebar.js +121 -0
  121. package/dist/organisms/layout.d.ts +3 -0
  122. package/dist/organisms/layout.js +16 -0
  123. package/package.json +120 -0
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
6
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,41 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import * as r from "@radix-ui/react-avatar";
3
+ import { cn as l } from "../lib/utils.js";
4
+ function i({ className: a, ...t }) {
5
+ return /* @__PURE__ */ e(
6
+ r.Root,
7
+ {
8
+ "data-slot": "avatar",
9
+ className: l("relative flex size-8 shrink-0 overflow-hidden rounded-full", a),
10
+ ...t
11
+ }
12
+ );
13
+ }
14
+ function n({ className: a, ...t }) {
15
+ return /* @__PURE__ */ e(
16
+ r.Image,
17
+ {
18
+ "data-slot": "avatar-image",
19
+ className: l("aspect-square size-full", a),
20
+ ...t
21
+ }
22
+ );
23
+ }
24
+ function f({
25
+ className: a,
26
+ ...t
27
+ }) {
28
+ return /* @__PURE__ */ e(
29
+ r.Fallback,
30
+ {
31
+ "data-slot": "avatar-fallback",
32
+ className: l("bg-muted flex size-full items-center justify-center rounded-full", a),
33
+ ...t
34
+ }
35
+ );
36
+ }
37
+ export {
38
+ i as Avatar,
39
+ f as AvatarFallback,
40
+ n as AvatarImage
41
+ };
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export { Badge, badgeVariants };
@@ -0,0 +1,32 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { Slot as o } from "@radix-ui/react-slot";
3
+ import { cva as n } from "class-variance-authority";
4
+ import { cn as s } from "../lib/utils.js";
5
+ const d = n(
6
+ "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-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 transition-[color,box-shadow] overflow-hidden",
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
11
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
12
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
13
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
14
+ }
15
+ },
16
+ defaultVariants: {
17
+ variant: "default"
18
+ }
19
+ }
20
+ );
21
+ function b({
22
+ className: r,
23
+ variant: e,
24
+ asChild: t = !1,
25
+ ...i
26
+ }) {
27
+ return /* @__PURE__ */ a(t ? o : "span", { "data-slot": "badge", className: s(d({ variant: e }), r), ...i });
28
+ }
29
+ export {
30
+ b as Badge,
31
+ d as badgeVariants
32
+ };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
3
+ declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): import("react/jsx-runtime").JSX.Element;
4
+ declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
5
+ declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
6
+ asChild?: boolean;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
9
+ declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
10
+ declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
11
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,95 @@
1
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
+ import { Slot as s } from "@radix-ui/react-slot";
3
+ import { ChevronRight as i, MoreHorizontal as l } from "lucide-react";
4
+ import { cn as t } from "../lib/utils.js";
5
+ function p({ ...r }) {
6
+ return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...r });
7
+ }
8
+ function f({ className: r, ...e }) {
9
+ return /* @__PURE__ */ a(
10
+ "ol",
11
+ {
12
+ "data-slot": "breadcrumb-list",
13
+ className: t(
14
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
15
+ r
16
+ ),
17
+ ...e
18
+ }
19
+ );
20
+ }
21
+ function g({ className: r, ...e }) {
22
+ return /* @__PURE__ */ a(
23
+ "li",
24
+ {
25
+ "data-slot": "breadcrumb-item",
26
+ className: t("inline-flex items-center gap-1.5", r),
27
+ ...e
28
+ }
29
+ );
30
+ }
31
+ function x({
32
+ asChild: r,
33
+ className: e,
34
+ ...n
35
+ }) {
36
+ return /* @__PURE__ */ a(
37
+ r ? s : "a",
38
+ {
39
+ "data-slot": "breadcrumb-link",
40
+ className: t("hover:text-foreground transition-colors", e),
41
+ ...n
42
+ }
43
+ );
44
+ }
45
+ function h({ className: r, ...e }) {
46
+ return /* @__PURE__ */ a(
47
+ "span",
48
+ {
49
+ "data-slot": "breadcrumb-page",
50
+ role: "link",
51
+ "aria-disabled": "true",
52
+ "aria-current": "page",
53
+ className: t("text-foreground font-normal", r),
54
+ ...e
55
+ }
56
+ );
57
+ }
58
+ function N({ children: r, className: e, ...n }) {
59
+ return /* @__PURE__ */ a(
60
+ "li",
61
+ {
62
+ "data-slot": "breadcrumb-separator",
63
+ role: "presentation",
64
+ "aria-hidden": "true",
65
+ className: t("[&>svg]:size-3.5", e),
66
+ ...n,
67
+ children: r ?? /* @__PURE__ */ a(i, {})
68
+ }
69
+ );
70
+ }
71
+ function B({ className: r, ...e }) {
72
+ return /* @__PURE__ */ o(
73
+ "span",
74
+ {
75
+ "data-slot": "breadcrumb-ellipsis",
76
+ role: "presentation",
77
+ "aria-hidden": "true",
78
+ className: t("flex size-9 items-center justify-center", r),
79
+ ...e,
80
+ children: [
81
+ /* @__PURE__ */ a(l, { className: "size-4" }),
82
+ /* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
83
+ ]
84
+ }
85
+ );
86
+ }
87
+ export {
88
+ p as Breadcrumb,
89
+ B as BreadcrumbEllipsis,
90
+ g as BreadcrumbItem,
91
+ x as BreadcrumbLink,
92
+ f as BreadcrumbList,
93
+ h as BreadcrumbPage,
94
+ N as BreadcrumbSeparator
95
+ };
@@ -0,0 +1,11 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { Separator } from './separator';
3
+ declare const buttonGroupVariants: (props?: ({
4
+ orientation?: "horizontal" | "vertical" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react/jsx-runtime").JSX.Element;
7
+ declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
8
+ asChild?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
11
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
@@ -0,0 +1,75 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Slot as a } from "@radix-ui/react-slot";
3
+ import { cva as i } from "class-variance-authority";
4
+ import { cn as n } from "../lib/utils.js";
5
+ import { Separator as s } from "./separator.js";
6
+ const l = i(
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 h({
21
+ className: o,
22
+ orientation: t,
23
+ ...r
24
+ }) {
25
+ return /* @__PURE__ */ e(
26
+ "div",
27
+ {
28
+ role: "group",
29
+ "data-slot": "button-group",
30
+ "data-orientation": t,
31
+ className: n(l({ orientation: t }), o),
32
+ ...r
33
+ }
34
+ );
35
+ }
36
+ function g({
37
+ className: o,
38
+ asChild: t = !1,
39
+ ...r
40
+ }) {
41
+ return /* @__PURE__ */ e(
42
+ t ? a : "div",
43
+ {
44
+ className: n(
45
+ "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",
46
+ o
47
+ ),
48
+ ...r
49
+ }
50
+ );
51
+ }
52
+ function v({
53
+ className: o,
54
+ orientation: t = "vertical",
55
+ ...r
56
+ }) {
57
+ return /* @__PURE__ */ e(
58
+ s,
59
+ {
60
+ "data-slot": "button-group-separator",
61
+ orientation: t,
62
+ className: n(
63
+ "bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
64
+ o
65
+ ),
66
+ ...r
67
+ }
68
+ );
69
+ }
70
+ export {
71
+ h as ButtonGroup,
72
+ v as ButtonGroupSeparator,
73
+ g as ButtonGroupText,
74
+ l as buttonGroupVariants
75
+ };
@@ -0,0 +1,10 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export { Button, buttonVariants };
@@ -0,0 +1,51 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Slot as s } from "@radix-ui/react-slot";
3
+ import { cva as a } from "class-variance-authority";
4
+ import { cn as d } from "../lib/utils.js";
5
+ const c = a(
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 b({
33
+ className: e,
34
+ variant: r,
35
+ size: t,
36
+ asChild: i = !1,
37
+ ...n
38
+ }) {
39
+ return /* @__PURE__ */ o(
40
+ i ? s : "button",
41
+ {
42
+ "data-slot": "button",
43
+ className: d(c({ variant: r, size: t, className: e })),
44
+ ...n
45
+ }
46
+ );
47
+ }
48
+ export {
49
+ b as Button,
50
+ c as buttonVariants
51
+ };
@@ -0,0 +1,8 @@
1
+ import { DayButton, DayPicker } from 'react-day-picker';
2
+ import { Button } from './button';
3
+ import * as React from "react";
4
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
+ buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
8
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,144 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import { ChevronLeftIcon as b, ChevronRightIcon as h, ChevronDownIcon as w } from "lucide-react";
4
+ import { getDefaultClassNames as p, DayPicker as _ } from "react-day-picker";
5
+ import { cn as e } from "../lib/utils.js";
6
+ import { buttonVariants as f, Button as y } from "./button.js";
7
+ function j({
8
+ className: c,
9
+ classNames: i,
10
+ showOutsideDays: r = !0,
11
+ captionLayout: l = "label",
12
+ buttonVariant: s = "ghost",
13
+ formatters: u,
14
+ components: x,
15
+ ...g
16
+ }) {
17
+ const t = p();
18
+ return /* @__PURE__ */ n(
19
+ _,
20
+ {
21
+ showOutsideDays: r,
22
+ className: e(
23
+ "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
24
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
25
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
26
+ c
27
+ ),
28
+ captionLayout: l,
29
+ formatters: {
30
+ formatMonthDropdown: (a) => a.toLocaleString("default", { month: "short" }),
31
+ ...u
32
+ },
33
+ classNames: {
34
+ root: e("w-fit", t.root),
35
+ months: e("flex gap-4 flex-col md:flex-row relative", t.months),
36
+ month: e("flex flex-col w-full gap-4", t.month),
37
+ nav: e(
38
+ "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
39
+ t.nav
40
+ ),
41
+ button_previous: e(
42
+ f({ variant: s }),
43
+ "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
44
+ t.button_previous
45
+ ),
46
+ button_next: e(
47
+ f({ variant: s }),
48
+ "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
49
+ t.button_next
50
+ ),
51
+ month_caption: e(
52
+ "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
53
+ t.month_caption
54
+ ),
55
+ dropdowns: e(
56
+ "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
57
+ t.dropdowns
58
+ ),
59
+ dropdown_root: e(
60
+ "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
61
+ t.dropdown_root
62
+ ),
63
+ dropdown: e("absolute bg-popover inset-0 opacity-0", t.dropdown),
64
+ caption_label: e(
65
+ "select-none font-medium",
66
+ l === "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",
67
+ t.caption_label
68
+ ),
69
+ table: "w-full border-collapse",
70
+ weekdays: e("flex", t.weekdays),
71
+ weekday: e(
72
+ "text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
73
+ t.weekday
74
+ ),
75
+ week: e("flex w-full mt-2", t.week),
76
+ week_number_header: e("select-none w-(--cell-size)", t.week_number_header),
77
+ week_number: e(
78
+ "text-[0.8rem] select-none text-muted-foreground",
79
+ t.week_number
80
+ ),
81
+ day: e(
82
+ "relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
83
+ g.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
84
+ t.day
85
+ ),
86
+ range_start: e("rounded-l-md bg-accent", t.range_start),
87
+ range_middle: e("rounded-none", t.range_middle),
88
+ range_end: e("rounded-r-md bg-accent", t.range_end),
89
+ today: e(
90
+ "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
91
+ t.today
92
+ ),
93
+ outside: e(
94
+ "text-muted-foreground aria-selected:text-muted-foreground",
95
+ t.outside
96
+ ),
97
+ disabled: e("text-muted-foreground opacity-50", t.disabled),
98
+ hidden: e("invisible", t.hidden),
99
+ ...i
100
+ },
101
+ components: {
102
+ Root: ({ className: a, rootRef: d, ...o }) => /* @__PURE__ */ n("div", { "data-slot": "calendar", ref: d, className: e(a), ...o }),
103
+ Chevron: ({ className: a, orientation: d, ...o }) => d === "left" ? /* @__PURE__ */ n(b, { className: e("size-4", a), ...o }) : d === "right" ? /* @__PURE__ */ n(h, { className: e("size-4", a), ...o }) : /* @__PURE__ */ n(w, { className: e("size-4", a), ...o }),
104
+ DayButton: v,
105
+ WeekNumber: ({ children: a, ...d }) => /* @__PURE__ */ n("td", { ...d, children: /* @__PURE__ */ n("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: a }) }),
106
+ ...x
107
+ },
108
+ ...g
109
+ }
110
+ );
111
+ }
112
+ function v({
113
+ className: c,
114
+ day: i,
115
+ modifiers: r,
116
+ ...l
117
+ }) {
118
+ const s = p(), u = m.useRef(null);
119
+ return m.useEffect(() => {
120
+ r.focused && u.current?.focus();
121
+ }, [r.focused]), /* @__PURE__ */ n(
122
+ y,
123
+ {
124
+ ref: u,
125
+ variant: "ghost",
126
+ size: "icon",
127
+ "data-day": i.date.toLocaleDateString(),
128
+ "data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
129
+ "data-range-start": r.range_start,
130
+ "data-range-end": r.range_end,
131
+ "data-range-middle": r.range_middle,
132
+ className: e(
133
+ "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",
134
+ s.day,
135
+ c
136
+ ),
137
+ ...l
138
+ }
139
+ );
140
+ }
141
+ export {
142
+ j as Calendar,
143
+ v as CalendarDayButton
144
+ };
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
4
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
5
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
@@ -0,0 +1,80 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { cn as o } from "../lib/utils.js";
3
+ function n({ className: t, ...r }) {
4
+ return /* @__PURE__ */ a(
5
+ "div",
6
+ {
7
+ "data-slot": "card",
8
+ className: o(
9
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
10
+ t
11
+ ),
12
+ ...r
13
+ }
14
+ );
15
+ }
16
+ function s({ className: t, ...r }) {
17
+ return /* @__PURE__ */ a(
18
+ "div",
19
+ {
20
+ "data-slot": "card-header",
21
+ className: o(
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
+ t
24
+ ),
25
+ ...r
26
+ }
27
+ );
28
+ }
29
+ function c({ className: t, ...r }) {
30
+ return /* @__PURE__ */ a(
31
+ "div",
32
+ {
33
+ "data-slot": "card-title",
34
+ className: o("leading-none font-semibold", t),
35
+ ...r
36
+ }
37
+ );
38
+ }
39
+ function i({ className: t, ...r }) {
40
+ return /* @__PURE__ */ a(
41
+ "div",
42
+ {
43
+ "data-slot": "card-description",
44
+ className: o("text-muted-foreground text-sm", t),
45
+ ...r
46
+ }
47
+ );
48
+ }
49
+ function l({ className: t, ...r }) {
50
+ return /* @__PURE__ */ a(
51
+ "div",
52
+ {
53
+ "data-slot": "card-action",
54
+ className: o("col-start-2 row-span-2 row-start-1 self-start justify-self-end", t),
55
+ ...r
56
+ }
57
+ );
58
+ }
59
+ function u({ className: t, ...r }) {
60
+ return /* @__PURE__ */ a("div", { "data-slot": "card-content", className: o("px-6", t), ...r });
61
+ }
62
+ function f({ className: t, ...r }) {
63
+ return /* @__PURE__ */ a(
64
+ "div",
65
+ {
66
+ "data-slot": "card-footer",
67
+ className: o("flex items-center px-6 [.border-t]:pt-6", t),
68
+ ...r
69
+ }
70
+ );
71
+ }
72
+ export {
73
+ n as Card,
74
+ l as CardAction,
75
+ u as CardContent,
76
+ i as CardDescription,
77
+ f as CardFooter,
78
+ s as CardHeader,
79
+ c as CardTitle
80
+ };
@@ -0,0 +1,19 @@
1
+ import { default as useEmblaCarousel, UseEmblaCarouselType } from 'embla-carousel-react';
2
+ import { Button } from './button';
3
+ import * as React from "react";
4
+ type CarouselApi = UseEmblaCarouselType[1];
5
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
6
+ type CarouselOptions = UseCarouselParameters[0];
7
+ type CarouselPlugin = UseCarouselParameters[1];
8
+ type CarouselProps = {
9
+ opts?: CarouselOptions;
10
+ plugins?: CarouselPlugin;
11
+ orientation?: "horizontal" | "vertical";
12
+ setApi?: (api: CarouselApi) => void;
13
+ };
14
+ declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<"div"> & CarouselProps): import("react/jsx-runtime").JSX.Element;
15
+ declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
16
+ declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
17
+ declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
18
+ declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
19
+ export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };