@arch-cadre/ui 0.0.43 → 0.0.45

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 (193) hide show
  1. package/build.config.js +22 -0
  2. package/dist/components/accordion.js +18 -0
  3. package/dist/components/alert-dialog.js +39 -0
  4. package/dist/components/alert.js +24 -0
  5. package/dist/components/aspect-ratio.js +7 -0
  6. package/dist/components/avatar.js +14 -0
  7. package/dist/components/badge.js +22 -0
  8. package/dist/components/breadcrumb.js +30 -0
  9. package/dist/components/button-group.js +28 -0
  10. package/dist/components/button.js +33 -0
  11. package/dist/components/calendar.js +76 -0
  12. package/dist/components/card.js +24 -0
  13. package/dist/components/checkbox.js +9 -0
  14. package/dist/components/collapsible.js +13 -0
  15. package/dist/components/command.js +34 -0
  16. package/dist/components/context-menu.js +51 -0
  17. package/dist/components/dialog.js +36 -0
  18. package/dist/components/drawer.js +35 -0
  19. package/dist/components/dropdown-menu.js +51 -0
  20. package/dist/components/empty.js +33 -0
  21. package/dist/components/field.js +78 -0
  22. package/dist/components/form.js +59 -0
  23. package/dist/components/hover-card.js +14 -0
  24. package/dist/components/input-group.js +63 -0
  25. package/dist/components/input-otp.js +21 -0
  26. package/dist/components/input.js +6 -0
  27. package/dist/components/item.js +66 -0
  28. package/dist/components/kbd.js +9 -0
  29. package/dist/components/label.js +8 -0
  30. package/dist/components/language-switcher.js +20 -0
  31. package/dist/components/menubar.js +54 -0
  32. package/dist/components/navigation-menu.js +31 -0
  33. package/dist/components/pagination.js +31 -0
  34. package/dist/components/popover.js +17 -0
  35. package/dist/components/progress.js +8 -0
  36. package/dist/components/radio-group.js +12 -0
  37. package/dist/components/scroll-area.js +13 -0
  38. package/dist/components/select.js +38 -0
  39. package/dist/components/separator.js +8 -0
  40. package/dist/components/sheet.js +40 -0
  41. package/dist/components/sidebar.js +213 -0
  42. package/dist/components/skeleton.js +6 -0
  43. package/dist/components/slider.js +14 -0
  44. package/dist/components/sonner.js +21 -0
  45. package/dist/components/spinner.js +7 -0
  46. package/dist/components/switch.js +8 -0
  47. package/dist/components/table.js +28 -0
  48. package/dist/components/tabs.js +17 -0
  49. package/dist/components/textarea.js +6 -0
  50. package/dist/components/toggle-group.js +22 -0
  51. package/dist/components/toggle.js +26 -0
  52. package/dist/components/tooltip.js +17 -0
  53. package/dist/hooks/use-mobile.js +15 -0
  54. package/dist/hooks/use-user.js +25 -0
  55. package/dist/lib/{utils.mjs → utils.js} +1 -1
  56. package/dist/logo.js +28 -0
  57. package/dist/postcss.config.mjs +1 -2
  58. package/dist/providers/auth-provider.js +27 -0
  59. package/dist/providers/index.js +23 -0
  60. package/dist/shared/access-denied.js +6 -0
  61. package/dist/shared/loader.js +41 -0
  62. package/dist/shared/page-loader.js +6 -0
  63. package/dist/shared/scroll-fade-effect.js +5 -0
  64. package/package.json +14 -20
  65. package/src/providers/index.tsx +1 -1
  66. package/tsconfig.json +3 -2
  67. package/dist/components/.gitkeep +0 -0
  68. package/dist/components/accordion.d.ts +0 -7
  69. package/dist/components/accordion.mjs +0 -58
  70. package/dist/components/alert-dialog.d.ts +0 -14
  71. package/dist/components/alert-dialog.mjs +0 -144
  72. package/dist/components/alert.d.ts +0 -9
  73. package/dist/components/alert.mjs +0 -62
  74. package/dist/components/aspect-ratio.d.ts +0 -4
  75. package/dist/components/aspect-ratio.mjs +0 -9
  76. package/dist/components/avatar.d.ts +0 -6
  77. package/dist/components/avatar.mjs +0 -50
  78. package/dist/components/badge.d.ts +0 -9
  79. package/dist/components/badge.mjs +0 -37
  80. package/dist/components/breadcrumb.d.ts +0 -11
  81. package/dist/components/breadcrumb.mjs +0 -105
  82. package/dist/components/button-group.d.ts +0 -13
  83. package/dist/components/button-group.mjs +0 -76
  84. package/dist/components/button.d.ts +0 -10
  85. package/dist/components/button.mjs +0 -51
  86. package/dist/components/calendar.d.ts +0 -8
  87. package/dist/components/calendar.mjs +0 -191
  88. package/dist/components/card.d.ts +0 -9
  89. package/dist/components/card.mjs +0 -90
  90. package/dist/components/checkbox.d.ts +0 -4
  91. package/dist/components/checkbox.mjs +0 -30
  92. package/dist/components/collapsible.d.ts +0 -6
  93. package/dist/components/collapsible.mjs +0 -31
  94. package/dist/components/command.d.ts +0 -18
  95. package/dist/components/command.mjs +0 -169
  96. package/dist/components/context-menu.d.ts +0 -25
  97. package/dist/components/context-menu.mjs +0 -218
  98. package/dist/components/dialog.d.ts +0 -15
  99. package/dist/components/dialog.mjs +0 -130
  100. package/dist/components/drawer.d.ts +0 -13
  101. package/dist/components/drawer.mjs +0 -124
  102. package/dist/components/dropdown-menu.d.ts +0 -25
  103. package/dist/components/dropdown-menu.mjs +0 -226
  104. package/dist/components/empty.d.ts +0 -12
  105. package/dist/components/empty.mjs +0 -102
  106. package/dist/components/field.d.ts +0 -25
  107. package/dist/components/field.mjs +0 -228
  108. package/dist/components/form.d.ts +0 -23
  109. package/dist/components/form.mjs +0 -123
  110. package/dist/components/hover-card.d.ts +0 -6
  111. package/dist/components/hover-card.mjs +0 -35
  112. package/dist/components/input-group.d.ts +0 -16
  113. package/dist/components/input-group.mjs +0 -155
  114. package/dist/components/input-otp.d.ts +0 -11
  115. package/dist/components/input-otp.mjs +0 -59
  116. package/dist/components/input.d.ts +0 -3
  117. package/dist/components/input.mjs +0 -19
  118. package/dist/components/item.d.ts +0 -23
  119. package/dist/components/item.mjs +0 -187
  120. package/dist/components/kbd.d.ts +0 -4
  121. package/dist/components/kbd.mjs +0 -28
  122. package/dist/components/label.d.ts +0 -4
  123. package/dist/components/label.mjs +0 -21
  124. package/dist/components/language-switcher.d.ts +0 -2
  125. package/dist/components/language-switcher.mjs +0 -30
  126. package/dist/components/menubar.d.ts +0 -26
  127. package/dist/components/menubar.mjs +0 -246
  128. package/dist/components/navigation-menu.d.ts +0 -14
  129. package/dist/components/navigation-menu.mjs +0 -166
  130. package/dist/components/pagination.d.ts +0 -15
  131. package/dist/components/pagination.mjs +0 -116
  132. package/dist/components/popover.d.ts +0 -7
  133. package/dist/components/popover.mjs +0 -40
  134. package/dist/components/progress.d.ts +0 -4
  135. package/dist/components/progress.mjs +0 -30
  136. package/dist/components/radio-group.d.ts +0 -5
  137. package/dist/components/radio-group.mjs +0 -43
  138. package/dist/components/scroll-area.d.ts +0 -7
  139. package/dist/components/scroll-area.mjs +0 -59
  140. package/dist/components/select.d.ts +0 -15
  141. package/dist/components/select.mjs +0 -173
  142. package/dist/components/separator.d.ts +0 -4
  143. package/dist/components/separator.mjs +0 -25
  144. package/dist/components/sheet.d.ts +0 -13
  145. package/dist/components/sheet.mjs +0 -119
  146. package/dist/components/sidebar.d.ts +0 -69
  147. package/dist/components/sidebar.mjs +0 -635
  148. package/dist/components/skeleton.d.ts +0 -3
  149. package/dist/components/skeleton.mjs +0 -13
  150. package/dist/components/slider.d.ts +0 -4
  151. package/dist/components/slider.mjs +0 -59
  152. package/dist/components/sonner.d.ts +0 -4
  153. package/dist/components/sonner.mjs +0 -36
  154. package/dist/components/spinner.d.ts +0 -3
  155. package/dist/components/spinner.mjs +0 -15
  156. package/dist/components/switch.d.ts +0 -4
  157. package/dist/components/switch.mjs +0 -30
  158. package/dist/components/table.d.ts +0 -10
  159. package/dist/components/table.mjs +0 -115
  160. package/dist/components/tabs.d.ts +0 -7
  161. package/dist/components/tabs.mjs +0 -63
  162. package/dist/components/textarea.d.ts +0 -3
  163. package/dist/components/textarea.mjs +0 -16
  164. package/dist/components/toggle-group.d.ts +0 -9
  165. package/dist/components/toggle-group.mjs +0 -65
  166. package/dist/components/toggle.d.ts +0 -9
  167. package/dist/components/toggle.mjs +0 -41
  168. package/dist/components/tooltip.d.ts +0 -7
  169. package/dist/components/tooltip.mjs +0 -49
  170. package/dist/hooks/.gitkeep +0 -0
  171. package/dist/hooks/use-mobile.d.ts +0 -1
  172. package/dist/hooks/use-mobile.mjs +0 -17
  173. package/dist/hooks/use-user.d.ts +0 -12
  174. package/dist/hooks/use-user.mjs +0 -12
  175. package/dist/index.mjs +0 -15
  176. package/dist/lib/utils.d.ts +0 -2
  177. package/dist/logo.d.ts +0 -15
  178. package/dist/logo.mjs +0 -32
  179. package/dist/postcss.config.d.mts +0 -3
  180. package/dist/providers/auth-provider.d.ts +0 -15
  181. package/dist/providers/auth-provider.mjs +0 -37
  182. package/dist/providers/index.d.ts +0 -7
  183. package/dist/providers/index.mjs +0 -33
  184. package/dist/shared/access-denied.d.ts +0 -2
  185. package/dist/shared/access-denied.mjs +0 -12
  186. package/dist/shared/loader.d.ts +0 -11
  187. package/dist/shared/loader.mjs +0 -98
  188. package/dist/shared/page-loader.d.ts +0 -7
  189. package/dist/shared/page-loader.mjs +0 -6
  190. package/dist/shared/scroll-fade-effect.d.ts +0 -4
  191. package/dist/shared/scroll-fade-effect.mjs +0 -20
  192. package/dist/styles/globals.css +0 -1
  193. /package/dist/{index.d.ts → index.js} +0 -0
@@ -1,37 +0,0 @@
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 badgeVariants = cva(
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 Badge({
22
- className,
23
- variant,
24
- asChild = false,
25
- ...props
26
- }) {
27
- const Comp = asChild ? SlotPrimitive.Slot : "span";
28
- return /* @__PURE__ */ React.createElement(
29
- Comp,
30
- {
31
- "data-slot": "badge",
32
- className: cn(badgeVariants({ variant }), className),
33
- ...props
34
- }
35
- );
36
- }
37
- export { Badge, badgeVariants };
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): React.JSX.Element;
3
- declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
4
- declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
5
- declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
6
- asChild?: boolean;
7
- }): React.JSX.Element;
8
- declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
9
- declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
10
- declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
11
- export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -1,105 +0,0 @@
1
- import { ChevronRight, MoreHorizontal } from "lucide-react";
2
- import { Slot as SlotPrimitive } from "radix-ui";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils.mjs";
5
- function Breadcrumb({ ...props }) {
6
- return /* @__PURE__ */ React.createElement("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
7
- }
8
- function BreadcrumbList({ className, ...props }) {
9
- return /* @__PURE__ */ React.createElement(
10
- "ol",
11
- {
12
- "data-slot": "breadcrumb-list",
13
- className: cn(
14
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
15
- className
16
- ),
17
- ...props
18
- }
19
- );
20
- }
21
- function BreadcrumbItem({ className, ...props }) {
22
- return /* @__PURE__ */ React.createElement(
23
- "li",
24
- {
25
- "data-slot": "breadcrumb-item",
26
- className: cn("inline-flex items-center gap-1.5", className),
27
- ...props
28
- }
29
- );
30
- }
31
- function BreadcrumbLink({
32
- asChild,
33
- className,
34
- ...props
35
- }) {
36
- const Comp = asChild ? SlotPrimitive.Slot : "a";
37
- return /* @__PURE__ */ React.createElement(
38
- Comp,
39
- {
40
- "data-slot": "breadcrumb-link",
41
- className: cn("hover:text-foreground transition-colors", className),
42
- ...props
43
- }
44
- );
45
- }
46
- function BreadcrumbPage({ className, ...props }) {
47
- return (
48
- // biome-ignore lint/a11y/useSemanticElements: <explanation>
49
- // biome-ignore lint/a11y/useFocusableInteractive: <explanation>
50
- /* @__PURE__ */ React.createElement(
51
- "span",
52
- {
53
- "data-slot": "breadcrumb-page",
54
- role: "link",
55
- "aria-disabled": "true",
56
- "aria-current": "page",
57
- className: cn("text-foreground font-normal", className),
58
- ...props
59
- }
60
- )
61
- );
62
- }
63
- function BreadcrumbSeparator({
64
- children,
65
- className,
66
- ...props
67
- }) {
68
- return /* @__PURE__ */ React.createElement(
69
- "li",
70
- {
71
- "data-slot": "breadcrumb-separator",
72
- role: "presentation",
73
- "aria-hidden": "true",
74
- className: cn("[&>svg]:size-3.5", className),
75
- ...props
76
- },
77
- children ?? /* @__PURE__ */ React.createElement(ChevronRight, null)
78
- );
79
- }
80
- function BreadcrumbEllipsis({
81
- className,
82
- ...props
83
- }) {
84
- return /* @__PURE__ */ React.createElement(
85
- "span",
86
- {
87
- "data-slot": "breadcrumb-ellipsis",
88
- role: "presentation",
89
- "aria-hidden": "true",
90
- className: cn("flex size-9 items-center justify-center", className),
91
- ...props
92
- },
93
- /* @__PURE__ */ React.createElement(MoreHorizontal, { className: "size-4" }),
94
- /* @__PURE__ */ React.createElement("span", { className: "sr-only" }, "More")
95
- );
96
- }
97
- export {
98
- Breadcrumb,
99
- BreadcrumbList,
100
- BreadcrumbItem,
101
- BreadcrumbLink,
102
- BreadcrumbPage,
103
- BreadcrumbSeparator,
104
- BreadcrumbEllipsis
105
- };
@@ -1,13 +0,0 @@
1
- /** biome-ignore-all lint/a11y/useSemanticElements: <explanation> */
2
- import { type VariantProps } from "class-variance-authority";
3
- import * as React from "react";
4
- import { Separator } from "./separator";
5
- declare const buttonGroupVariants: (props?: ({
6
- orientation?: "horizontal" | "vertical" | null | undefined;
7
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
- declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): React.JSX.Element;
9
- declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
10
- asChild?: boolean;
11
- }): React.JSX.Element;
12
- declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
13
- export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
@@ -1,76 +0,0 @@
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 +0,0 @@
1
- import { type VariantProps } from "class-variance-authority";
2
- import * as React from "react";
3
- declare const buttonVariants: (props?: ({
4
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
6
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
- declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
- asChild?: boolean;
9
- }): React.JSX.Element;
10
- export { Button, buttonVariants };
@@ -1,51 +0,0 @@
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 };
@@ -1,8 +0,0 @@
1
- import * as React from "react";
2
- import { type DayButton, DayPicker } from "react-day-picker";
3
- import { Button } from "./button";
4
- declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
- buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
- }): React.JSX.Element;
7
- declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
8
- export { Calendar, CalendarDayButton };
@@ -1,191 +0,0 @@
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 +0,0 @@
1
- import * as React from "react";
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
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -1,90 +0,0 @@
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 +0,0 @@
1
- import { Checkbox as CheckboxPrimitive } from "radix-ui";
2
- import * as React from "react";
3
- declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element;
4
- export { Checkbox };
@@ -1,30 +0,0 @@
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 +0,0 @@
1
- import { Collapsible as CollapsiblePrimitive } from "radix-ui";
2
- import * as React from "react";
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
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };